In [1]:
case_name = 'a_c1c2_c'
In [2]:
remote_data = True
data_dir='/gpfs/cfms/workarea/projects/hyper_flux/high_lift/cas2_config4_v2'
data_host='acimpoeru@vis03'
remote_server_auto = True
paraview_cmd='mpiexec /gpfs/cfms/apps/bin/pvserver'
if not remote_server_auto:
paraview_cmd=None
if not remote_data:
data_host='localhost'
paraview_cmd=None
In [3]:
%pylab inline
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
import pylab as pl
import math
import numpy as np
In [4]:
from zutil.post import pvserver_connect
if remote_data:
pvserver_connect(data_host=data_host,data_dir=data_dir,paraview_cmd=paraview_cmd)
Get control dictionary
In [5]:
from zutil.post import get_case_parameters,print_html_parameters
parameters=get_case_parameters(case_name,data_host=data_host,data_dir=data_dir)
Get status file
In [6]:
from zutil.post import get_status_dict
status=get_status_dict(case_name,data_host=data_host,data_dir=data_dir)
num_procs = str(status['num processor'])
In [7]:
alpha = 7.0 # degrees
Re = 15.0e06 # Reynolds number
reference_area = 419130.0 # frontal areas in mm^2
reference_length = 347.09 # mm^2
reference_span = 1400.0 #mm
pressure = 295000.0 # Pa
temperature = 114.0 # i.e.
gamma = 1.4
from IPython.display import HTML
HTML(print_html_parameters(parameters))
Out[7]:
In [8]:
import zutil
import zutil.post as post
reload(zutil)
reload(post)
from zutil.post import get_csv_data
import os
import glob
#import pandas as pd
#import hashlib
#position 1
cp_ps01 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps01.csv",header=True,remote=True,delim=',')
cp_ps01_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps01_flap.csv",header=True,remote=True,delim=',')
cp_ps01_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps01_slat.csv",header=True,remote=True,delim=',')
#position 2
cp_ps02 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps02.csv",header=True,remote=True,delim=',')
cp_ps02_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps02_flap.csv",header=True,remote=True,delim=',')
cp_ps02_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps02_slat.csv",header=True,remote=True,delim=',')
#position 4
cp_ps04 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps04.csv",header=True,remote=True,delim=',')
cp_ps04_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps04_flap.csv",header=True,remote=True,delim=',')
cp_ps04_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps04_slat.csv",header=True,remote=True,delim=',')
#position 5
cp_ps05 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps05.csv",header=True,remote=True,delim=',')
cp_ps05_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps05_flap.csv",header=True,remote=True,delim=',')
cp_ps05_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps05_slat.csv",header=True,remote=True,delim=',')
#position 6
cp_ps06 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps06.csv",header=True,remote=True,delim=',')
cp_ps06_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps06_flap.csv",header=True,remote=True,delim=',')
cp_ps06_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps06_slat.csv",header=True,remote=True,delim=',')
#position 7
cp_ps07 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps07.csv",header=True,remote=True,delim=',')
cp_ps07_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps07_flap.csv",header=True,remote=True,delim=',')
cp_ps07_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps07_slat.csv",header=True,remote=True,delim=',')
#position 8
cp_ps08 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps08.csv",header=True,remote=True,delim=',')
cp_ps08_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps08_flap.csv",header=True,remote=True,delim=',')
cp_ps08_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps08_slat.csv",header=True,remote=True,delim=',')
#position 9
cp_ps09 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps09.csv",header=True,remote=True,delim=',')
cp_ps09_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps09_flap.csv",header=True,remote=True,delim=',')
cp_ps09_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps09_slat.csv",header=True,remote=True,delim=',')
#position 10
cp_ps10 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps10.csv",header=True,remote=True,delim=',')
cp_ps10_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps10_flap.csv",header=True,remote=True,delim=',')
cp_ps10_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps10_slat.csv",header=True,remote=True,delim=',')
#position 11
cp_ps11 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps11.csv",header=True,remote=True,delim=',')
cp_ps11_flap = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps11_flap.csv",header=True,remote=True,delim=',')
cp_ps11_slat = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/results_csv_format/cp_ps11_slat.csv",header=True,remote=True,delim=',')
In [9]:
print cp_ps11_slat.keys()
In [10]:
import zutil
import zutil.post as post
reload(zutil)
reload(post)
from zutil.post import cp_profile_wall_from_file
# ----------------------------WING --------------------------------
#-----1
def wing_plot_cp_profile_1(w_ax,file_root,w_span_loc_1):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_1,0.0],
func=wing_plot_array_1,
axis=w_ax,
w_span_loc_1=w_span_loc_1,
alpha=alpha)
w_loop_counter_1 = 0
w_loop_data_1 = {}
def wing_plot_array_1(data_array,pts_array,**kwargs):
global w_loop_counter_1,w_loop_data_1
w_ax = kwargs['axis']
w_span_loc_1 = kwargs['w_span_loc_1']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_1[w_loop_counter_1] = (chord_array,cp_array)
w_loop_counter_1 += 1
#-----------2
def wing_plot_cp_profile_2(w_ax,file_root,w_span_loc_2):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_2,0.0],
func=wing_plot_array_2,
axis=w_ax,
w_span_loc_2=w_span_loc_2,
alpha=alpha)
w_loop_counter_2 = 0
w_loop_data_2 = {}
def wing_plot_array_2(data_array,pts_array,**kwargs):
global w_loop_counter_2,w_loop_data_2
w_ax = kwargs['axis']
w_span_loc_2 = kwargs['w_span_loc_2']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_2[w_loop_counter_2] = (chord_array,cp_array)
w_loop_counter_2 += 1
#---------------4
def wing_plot_cp_profile_4(w_ax,file_root,w_span_loc_4):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_4,0.0],
func=wing_plot_array_4,
axis=w_ax,
w_span_loc_4=w_span_loc_4,
alpha=alpha)
w_loop_counter_4 = 0
w_loop_data_4 = {}
def wing_plot_array_4(data_array,pts_array,**kwargs):
global w_loop_counter_4,w_loop_data_4
w_ax = kwargs['axis']
w_span_loc_4 = kwargs['w_span_loc_4']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_4[w_loop_counter_4] = (chord_array,cp_array)
w_loop_counter_4 += 1
#--------------5
def wing_plot_cp_profile_5(w_ax,file_root,w_span_loc_5):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_5,0.0],
func=wing_plot_array_5,
axis=w_ax,
w_span_loc_5=w_span_loc_5,
alpha=alpha)
w_loop_counter_5 = 0
w_loop_data_5 = {}
def wing_plot_array_5(data_array,pts_array,**kwargs):
global w_loop_counter_5,w_loop_data_5
w_ax = kwargs['axis']
w_span_loc_5 = kwargs['w_span_loc_5']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_5[w_loop_counter_5] = (chord_array,cp_array)
w_loop_counter_5 += 1
#------------6
def wing_plot_cp_profile_6(w_ax,file_root,w_span_loc_6):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_6,0.0],
func=wing_plot_array_6,
axis=w_ax,
w_span_loc_6=w_span_loc_6,
alpha=alpha)
w_loop_counter_6 = 0
w_loop_data_6 = {}
def wing_plot_array_6(data_array,pts_array,**kwargs):
global w_loop_counter_6,w_loop_data_6
w_ax = kwargs['axis']
w_span_loc_6 = kwargs['w_span_loc_6']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_6[w_loop_counter_6] = (chord_array,cp_array)
w_loop_counter_6 += 1
#------------7
def wing_plot_cp_profile_7(w_ax,file_root,w_span_loc_7):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_7,0.0],
func=wing_plot_array_7,
axis=w_ax,
w_span_loc_7=w_span_loc_7,
alpha=alpha)
w_loop_counter_7 = 0
w_loop_data_7 = {}
def wing_plot_array_7(data_array,pts_array,**kwargs):
global w_loop_counter_7,w_loop_data_7
w_ax = kwargs['axis']
w_span_loc_7 = kwargs['w_span_loc_7']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_7[w_loop_counter_7] = (chord_array,cp_array)
w_loop_counter_7 += 1
#------------8
def wing_plot_cp_profile_8(w_ax,file_root,w_span_loc_8):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_8,0.0],
func=wing_plot_array_8,
axis=w_ax,
w_span_loc_8=w_span_loc_8,
alpha=alpha)
w_loop_counter_8 = 0
w_loop_data_8 = {}
def wing_plot_array_8(data_array,pts_array,**kwargs):
global w_loop_counter_8,w_loop_data_8
w_ax = kwargs['axis']
w_span_loc_8 = kwargs['w_span_loc_8']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_8[w_loop_counter_8] = (chord_array,cp_array)
w_loop_counter_8 += 1
#------------9
def wing_plot_cp_profile_9(w_ax,file_root,w_span_loc_9):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_9,0.0],
func=wing_plot_array_9,
axis=w_ax,
w_span_loc_9=w_span_loc_9,
alpha=alpha)
w_loop_counter_9 = 0
w_loop_data_9 = {}
def wing_plot_array_9(data_array,pts_array,**kwargs):
global w_loop_counter_9,w_loop_data_9
w_ax = kwargs['axis']
w_span_loc_9 = kwargs['w_span_loc_9']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_9[w_loop_counter_9] = (chord_array,cp_array)
w_loop_counter_9 += 1
#------------10
def wing_plot_cp_profile_10(w_ax,file_root,w_span_loc_10):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_10,0.0],
func=wing_plot_array_10,
axis=w_ax,
w_span_loc_10=w_span_loc_10,
alpha=alpha)
w_loop_counter_10 = 0
w_loop_data_10 = {}
def wing_plot_array_10(data_array,pts_array,**kwargs):
global w_loop_counter_10,w_loop_data_10
w_ax = kwargs['axis']
w_span_loc_10 = kwargs['w_span_loc_10']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_10[w_loop_counter_10] = (chord_array,cp_array)
w_loop_counter_10 += 1
#------------11
def wing_plot_cp_profile_11(w_ax,file_root,w_span_loc_11):
force_data = cp_profile_wall_from_file(file_root,
[0.0,1.0,0.0],
[0.0, w_span_loc_11,0.0],
func=wing_plot_array_11,
axis=w_ax,
w_span_loc_11=w_span_loc_11,
alpha=alpha)
w_loop_counter_11 = 0
w_loop_data_11 = {}
def wing_plot_array_11(data_array,pts_array,**kwargs):
global w_loop_counter_11,w_loop_data_11
w_ax = kwargs['axis']
w_span_loc_11 = kwargs['w_span_loc_11']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
w_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
w_loop_data_11[w_loop_counter_11] = (chord_array,cp_array)
w_loop_counter_11 += 1
# ----------------------------SLAT-----------------------------------
# ------------1
def slat_plot_cp_profile_1(ax,file_root,s_x_loc_1,s_y_loc_1,s_z_loc_1):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_1,s_y_loc_1,s_z_loc_1], # definition of the points
func=slat_plot_array_1,
axis=ax,
s_x_loc_1=s_x_loc_1,
s_y_loc_1=s_y_loc_1,
s_z_loc_1=s_z_loc_1,
alpha=alpha)
s_loop_counter_1 = 0
s_loop_data_1 = {}
def slat_plot_array_1(data_array,pts_array,**kwargs):
global s_loop_counter_1,s_loop_data_1
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_1 = kwargs['s_x_loc_1']
s_y_loc_1 = kwargs['s_y_loc_1']
s_z_loc_1 = kwargs['s_z_loc_1']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_1[s_loop_counter_1] = (chord_array,cp_array)
s_loop_counter_1 += 1
#----------------2
def slat_plot_cp_profile_2(ax,file_root,s_x_loc_2,s_y_loc_2,s_z_loc_2):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_2,s_y_loc_2,s_z_loc_2], # definition of the points
func=slat_plot_array_2,
axis=ax,
s_x_loc_2=s_x_loc_2,
s_y_loc_2=s_y_loc_2,
s_z_loc_2=s_z_loc_2,
alpha=alpha)
s_loop_counter_2 = 0
s_loop_data_2 = {}
def slat_plot_array_2(data_array,pts_array,**kwargs):
global s_loop_counter_2,s_loop_data_2
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_2 = kwargs['s_x_loc_2']
s_y_loc_2 = kwargs['s_y_loc_2']
s_z_loc_2 = kwargs['s_z_loc_2']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_2[s_loop_counter_2] = (chord_array,cp_array)
s_loop_counter_2 += 1
#----------------4
def slat_plot_cp_profile_4(ax,file_root,s_x_loc_4,s_y_loc_4,s_z_loc_4):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_4,s_y_loc_4,s_z_loc_4], # definition of the points
func=slat_plot_array_4,
axis=ax,
s_x_loc_4=s_x_loc_4,
s_y_loc_4=s_y_loc_4,
s_z_loc_4=s_z_loc_4,
alpha=alpha)
s_loop_counter_4 = 0
s_loop_data_4 = {}
def slat_plot_array_4(data_array,pts_array,**kwargs):
global s_loop_counter_4,s_loop_data_4
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_4 = kwargs['s_x_loc_4']
s_y_loc_4 = kwargs['s_y_loc_4']
s_z_loc_4 = kwargs['s_z_loc_4']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_4[s_loop_counter_4] = (chord_array,cp_array)
s_loop_counter_4 += 1
#----------------5
def slat_plot_cp_profile_5(ax,file_root,s_x_loc_5,s_y_loc_5,s_z_loc_5):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_5,s_y_loc_5,s_z_loc_5], # definition of the points
func=slat_plot_array_5,
axis=ax,
s_x_loc_5=s_x_loc_5,
s_y_loc_5=s_y_loc_5,
s_z_loc_5=s_z_loc_5,
alpha=alpha)
s_loop_counter_5 = 0
s_loop_data_5 = {}
def slat_plot_array_5(data_array,pts_array,**kwargs):
global s_loop_counter_5,s_loop_data_5
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_5 = kwargs['s_x_loc_5']
s_y_loc_5 = kwargs['s_y_loc_5']
s_z_loc_5 = kwargs['s_z_loc_5']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_5[s_loop_counter_5] = (chord_array,cp_array)
s_loop_counter_5 += 1
#---------------6
def slat_plot_cp_profile_6(ax,file_root,s_x_loc_6,s_y_loc_6,s_z_loc_6):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_6,s_y_loc_6,s_z_loc_6], # definition of the points
func=slat_plot_array_6,
axis=ax,
s_x_loc_6=s_x_loc_6,
s_y_loc_6=s_y_loc_6,
s_z_loc_6=s_z_loc_6,
alpha=alpha)
s_loop_counter_6 = 0
s_loop_data_6 = {}
def slat_plot_array_6(data_array,pts_array,**kwargs):
global s_loop_counter_6,s_loop_data_6
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_6 = kwargs['s_x_loc_6']
s_y_loc_6 = kwargs['s_y_loc_6']
s_z_loc_6 = kwargs['s_z_loc_6']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_6[s_loop_counter_6] = (chord_array,cp_array)
s_loop_counter_6 += 1
#--------------7
def slat_plot_cp_profile_7(ax,file_root,s_x_loc_7,s_y_loc_7,s_z_loc_7):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_7,s_y_loc_7,s_z_loc_7], # definition of the points
func=slat_plot_array_7,
axis=ax,
s_x_loc_7=s_x_loc_7,
s_y_loc_7=s_y_loc_7,
s_z_loc_7=s_z_loc_7,
alpha=alpha)
s_loop_counter_7 = 0
s_loop_data_7 = {}
def slat_plot_array_7(data_array,pts_array,**kwargs):
global s_loop_counter_7,s_loop_data_7
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_7 = kwargs['s_x_loc_7']
s_y_loc_7 = kwargs['s_y_loc_7']
s_z_loc_7 = kwargs['s_z_loc_7']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_7[s_loop_counter_7] = (chord_array,cp_array)
s_loop_counter_7 += 1
#---------------8
def slat_plot_cp_profile_8(ax,file_root,s_x_loc_8,s_y_loc_8,s_z_loc_8):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_8,s_y_loc_8,s_z_loc_8], # definition of the points
func=slat_plot_array_8,
axis=ax,
s_x_loc_8=s_x_loc_8,
s_y_loc_8=s_y_loc_8,
s_z_loc_8=s_z_loc_8,
alpha=alpha)
s_loop_counter_8 = 0
s_loop_data_8 = {}
def slat_plot_array_8(data_array,pts_array,**kwargs):
global s_loop_counter_8,s_loop_data_8
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_8 = kwargs['s_x_loc_8']
s_y_loc_8 = kwargs['s_y_loc_8']
s_z_loc_8 = kwargs['s_z_loc_8']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_8[s_loop_counter_8] = (chord_array,cp_array)
s_loop_counter_8 += 1
#--------------9
def slat_plot_cp_profile_9(ax,file_root,s_x_loc_9,s_y_loc_9,s_z_loc_9):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_9,s_y_loc_9,s_z_loc_9], # definition of the points
func=slat_plot_array_9,
axis=ax,
s_x_loc_9=s_x_loc_9,
s_y_loc_9=s_y_loc_9,
s_z_loc_9=s_z_loc_9,
alpha=alpha)
s_loop_counter_9 = 0
s_loop_data_9 = {}
def slat_plot_array_9(data_array,pts_array,**kwargs):
global s_loop_counter_9,s_loop_data_9
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_9 = kwargs['s_x_loc_9']
s_y_loc_9 = kwargs['s_y_loc_9']
s_z_loc_9 = kwargs['s_z_loc_9']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_9[s_loop_counter_9] = (chord_array,cp_array)
s_loop_counter_9 += 1
#------------------10
def slat_plot_cp_profile_10(ax,file_root,s_x_loc,s_y_loc,s_z_loc):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_10,s_y_loc_10,s_z_loc_10], # definition of the points
func=slat_plot_array_10,
axis=ax,
s_x_loc_10=s_x_loc_10,
s_y_loc_10=s_y_loc_10,
s_z_loc_10=s_z_loc_10,
alpha=alpha)
s_loop_counter_10 = 0
s_loop_data_10 = {}
def slat_plot_array_10(data_array,pts_array,**kwargs):
global s_loop_counter_10,s_loop_data_10
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_10 = kwargs['s_x_loc_10']
s_y_loc_10 = kwargs['s_y_loc_10']
s_z_loc_10 = kwargs['s_z_loc_10']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_10[s_loop_counter_10] = (chord_array,cp_array)
s_loop_counter_10 += 1
#--------------------11
def slat_plot_cp_profile_11(ax,file_root,s_x_loc,s_y_loc,s_z_loc):
force_data = cp_profile_wall_from_file(file_root,
[0.003861,0.999926,0.011494], # the normal of the plane ----constant for the slat
[s_x_loc_11,s_y_loc_11,s_z_loc_11], # definition of the points
func=slat_plot_array_11,
axis=ax,
s_x_loc_11=s_x_loc_11,
s_y_loc_11=s_y_loc_11,
s_z_loc_11=s_z_loc_11,
alpha=alpha)
s_loop_counter_11 = 0
s_loop_data_11 = {}
def slat_plot_array_11(data_array,pts_array,**kwargs):
global s_loop_counter_11,s_loop_data_11
ax = kwargs['axis']
#s_span_loc = kwargs['s_span_loc']
s_x_loc_11 = kwargs['s_x_loc_11']
s_y_loc_11 = kwargs['s_y_loc_11']
s_z_loc_11 = kwargs['s_z_loc_11']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
#s_loop_data[s_loop_counter] = (pts_array,cp_array)
s_loop_data_11[s_loop_counter_11] = (chord_array,cp_array)
s_loop_counter_11 += 1
#----------------------------------------------------------------------
#------------------------------------FLAP------------------------------
#--------------1
def f_plot_cp_profile_1(f_ax,file_root,f_nx_1,f_ny_1,f_nz_1,f_x_loc_1,f_y_loc_1,f_z_loc_1):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_1,f_ny_1,f_nz_1], # the normal of the plane -----to revise
[f_x_loc_1,f_y_loc_1,f_z_loc_1], # points definition
func=flap_plot_array_1,
axis=f_ax,
f_nx_1 = f_nx_1,
f_ny_1 = f_ny_1,
f_nz_1 = f_nz_1,
f_x_loc_1 = f_x_loc_1,
f_y_loc_1 = f_y_loc_1,
f_z_loc_1 = f_z_loc_1,
alpha=alpha)
f_loop_counter_1 = 0
f_loop_data_1 = {}
def flap_plot_array_1(data_array,pts_array,**kwargs):
global f_loop_counter_1,f_loop_data_1
f_ax = kwargs['axis']
f_nx_1 = kwargs['f_nx_1']
f_ny_1 = kwargs['f_ny_1']
f_nz_1 = kwargs['f_nz_1']
f_x_loc_1 = kwargs['f_x_loc_1']
f_y_loc_1 = kwargs['f_y_loc_1']
f_z_loc_1 = kwargs['f_z_loc_1']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_1[f_loop_counter_1] = (chord_array,cp_array)
f_loop_counter_1 += 1
#---------------2
def f_plot_cp_profile_2(f_ax,file_root,f_nx_2,f_ny_2,f_nz_2,f_x_loc_2,f_y_loc_2,f_z_loc_2):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_2,f_ny_2,f_nz_2], # the normal of the plane -----to revise
[f_x_loc_2,f_y_loc_2,f_z_loc_2], # points definition
func=flap_plot_array_2,
axis=f_ax,
f_nx_2 = f_nx_2,
f_ny_2 = f_ny_2,
f_nz_2 = f_nz_2,
f_x_loc_2 = f_x_loc_2,
f_y_loc_2 = f_y_loc_2,
f_z_loc_2 = f_z_loc_2,
alpha=alpha)
f_loop_counter_2 = 0
f_loop_data_2 = {}
def flap_plot_array_2(data_array,pts_array,**kwargs):
global f_loop_counter_2,f_loop_data_2
f_ax = kwargs['axis']
f_nx_2 = kwargs['f_nx_2']
f_ny_2 = kwargs['f_ny_2']
f_nz_2 = kwargs['f_nz_2']
f_x_loc_2 = kwargs['f_x_loc_2']
f_y_loc_2 = kwargs['f_y_loc_2']
f_z_loc_2 = kwargs['f_z_loc_2']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_2[f_loop_counter_2] = (chord_array,cp_array)
f_loop_counter_2 += 1
#---------------4
def f_plot_cp_profile_4(f_ax,file_root,f_nx_4,f_ny_4,f_nz_4,f_x_loc_4,f_y_loc_4,f_z_loc_4):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_4,f_ny_4,f_nz_4], # the normal of the plane -----to revise
[f_x_loc_4,f_y_loc_4,f_z_loc_4], # points definition
func=flap_plot_array_4,
axis=f_ax,
f_nx_4 = f_nx_4,
f_ny_4 = f_ny_4,
f_nz_4 = f_nz_4,
f_x_loc_4 = f_x_loc_4,
f_y_loc_4 = f_y_loc_4,
f_z_loc_4 = f_z_loc_4,
alpha=alpha)
f_loop_counter_4 = 0
f_loop_data_4 = {}
def flap_plot_array_4(data_array,pts_array,**kwargs):
global f_loop_counter_4,f_loop_data_4
f_ax = kwargs['axis']
f_nx_4 = kwargs['f_nx_4']
f_ny_4 = kwargs['f_ny_4']
f_nz_4 = kwargs['f_nz_4']
f_x_loc_4 = kwargs['f_x_loc_4']
f_y_loc_4 = kwargs['f_y_loc_4']
f_z_loc_4 = kwargs['f_z_loc_4']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_4[f_loop_counter_4] = (chord_array,cp_array)
f_loop_counter_4 += 1
#---------------5
def f_plot_cp_profile_5(f_ax,file_root,f_nx_5,f_ny_5,f_nz_5,f_x_loc_5,f_y_loc_5,f_z_loc_5):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_5,f_ny_5,f_nz_5], # the normal of the plane -----to revise
[f_x_loc_5,f_y_loc_5,f_z_loc_5], # points definition
func=flap_plot_array_5,
axis=f_ax,
f_nx_5 = f_nx_1,
f_ny_5 = f_ny_5,
f_nz_5 = f_nz_5,
f_x_loc_5 = f_x_loc_5,
f_y_loc_5 = f_y_loc_5,
f_z_loc_5 = f_z_loc_5,
alpha=alpha)
f_loop_counter_5 = 0
f_loop_data_5 = {}
def flap_plot_array_5(data_array,pts_array,**kwargs):
global f_loop_counter_5,f_loop_data_5
f_ax = kwargs['axis']
f_nx_5 = kwargs['f_nx_5']
f_ny_5 = kwargs['f_ny_5']
f_nz_5 = kwargs['f_nz_5']
f_x_loc_5 = kwargs['f_x_loc_5']
f_y_loc_5 = kwargs['f_y_loc_5']
f_z_loc_5 = kwargs['f_z_loc_5']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_5[f_loop_counter_5] = (chord_array,cp_array)
f_loop_counter_5 += 1
#---------------6
def f_plot_cp_profile_6(f_ax,file_root,f_nx_6,f_ny_6,f_nz_6,f_x_loc_6,f_y_loc_6,f_z_loc_6):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_6,f_ny_6,f_nz_6], # the normal of the plane -----to revise
[f_x_loc_6,f_y_loc_6,f_z_loc_6], # points definition
func=flap_plot_array_6,
axis=f_ax,
f_nx_6 = f_nx_6,
f_ny_6 = f_ny_6,
f_nz_6 = f_nz_6,
f_x_loc_6 = f_x_loc_6,
f_y_loc_6 = f_y_loc_6,
f_z_loc_6 = f_z_loc_6,
alpha=alpha)
f_loop_counter_6 = 0
f_loop_data_6 = {}
def flap_plot_array_6(data_array,pts_array,**kwargs):
global f_loop_counter_6,f_loop_data_6
f_ax = kwargs['axis']
f_nx_6 = kwargs['f_nx_6']
f_ny_6 = kwargs['f_ny_6']
f_nz_6 = kwargs['f_nz_6']
f_x_loc_6 = kwargs['f_x_loc_6']
f_y_loc_6 = kwargs['f_y_loc_6']
f_z_loc_6 = kwargs['f_z_loc_6']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_6[f_loop_counter_6] = (chord_array,cp_array)
f_loop_counter_6 += 1
#---------------7
def f_plot_cp_profile_7(f_ax,file_root,f_nx_7,f_ny_7,f_nz_7,f_x_loc_7,f_y_loc_7,f_z_loc_7):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_7,f_ny_7,f_nz_7], # the normal of the plane -----to revise
[f_x_loc_7,f_y_loc_7,f_z_loc_7], # points definition
func=flap_plot_array_7,
axis=f_ax,
f_nx_7 = f_nx_7,
f_ny_7 = f_ny_7,
f_nz_7 = f_nz_7,
f_x_loc_7 = f_x_loc_7,
f_y_loc_7 = f_y_loc_7,
f_z_loc_7 = f_z_loc_7,
alpha=alpha)
f_loop_counter_7 = 0
f_loop_data_7 = {}
def flap_plot_array_7(data_array,pts_array,**kwargs):
global f_loop_counter_7,f_loop_data_7
f_ax = kwargs['axis']
f_nx_7 = kwargs['f_nx_7']
f_ny_7 = kwargs['f_ny_7']
f_nz_7 = kwargs['f_nz_7']
f_x_loc_7 = kwargs['f_x_loc_7']
f_y_loc_7 = kwargs['f_y_loc_7']
f_z_loc_7 = kwargs['f_z_loc_7']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_7[f_loop_counter_7] = (chord_array,cp_array)
f_loop_counter_7 += 1
#---------------8
def f_plot_cp_profile_8(f_ax,file_root,f_nx_8,f_ny_8,f_nz_8,f_x_loc_8,f_y_loc_8,f_z_loc_8):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_8,f_ny_8,f_nz_8], # the normal of the plane -----to revise
[f_x_loc_8,f_y_loc_8,f_z_loc_8], # points definition
func=flap_plot_array_8,
axis=f_ax,
f_nx_8 = f_nx_8,
f_ny_8 = f_ny_8,
f_nz_8 = f_nz_8,
f_x_loc_8 = f_x_loc_8,
f_y_loc_8 = f_y_loc_8,
f_z_loc_8 = f_z_loc_8,
alpha=alpha)
f_loop_counter_8 = 0
f_loop_data_8 = {}
def flap_plot_array_8(data_array,pts_array,**kwargs):
global f_loop_counter_8,f_loop_data_8
f_ax = kwargs['axis']
f_nx_8 = kwargs['f_nx_8']
f_ny_8 = kwargs['f_ny_8']
f_nz_8 = kwargs['f_nz_8']
f_x_loc_8 = kwargs['f_x_loc_8']
f_y_loc_8 = kwargs['f_y_loc_8']
f_z_loc_8 = kwargs['f_z_loc_8']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_8[f_loop_counter_8] = (chord_array,cp_array)
f_loop_counter_8 += 1
#---------------9
def f_plot_cp_profile_9(f_ax,file_root,f_nx_9,f_ny_9,f_nz_9,f_x_loc_9,f_y_loc_9,f_z_loc_9):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_9,f_ny_9,f_nz_9], # the normal of the plane -----to revise
[f_x_loc_9,f_y_loc_9,f_z_loc_9], # points definition
func=flap_plot_array_9,
axis=f_ax,
f_nx_9 = f_nx_9,
f_ny_9 = f_ny_9,
f_nz_9 = f_nz_9,
f_x_loc_9 = f_x_loc_9,
f_y_loc_9 = f_y_loc_9,
f_z_loc_9 = f_z_loc_9,
alpha=alpha)
f_loop_counter_9 = 0
f_loop_data_9 = {}
def flap_plot_array_9(data_array,pts_array,**kwargs):
global f_loop_counter_9,f_loop_data_9
f_ax = kwargs['axis']
f_nx_9 = kwargs['f_nx_9']
f_ny_9 = kwargs['f_ny_9']
f_nz_9 = kwargs['f_nz_9']
f_x_loc_9 = kwargs['f_x_loc_9']
f_y_loc_9 = kwargs['f_y_loc_9']
f_z_loc_9 = kwargs['f_z_loc_9']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_9[f_loop_counter_9] = (chord_array,cp_array)
f_loop_counter_9 += 1
#---------------10
def f_plot_cp_profile_10(f_ax,file_root,f_nx_10,f_ny_10,f_nz_10,f_x_loc_10,f_y_loc_10,f_z_loc_10):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_10,f_ny_10,f_nz_10], # the normal of the plane -----to revise
[f_x_loc_10,f_y_loc_10,f_z_loc_10], # points definition
func=flap_plot_array_10,
axis=f_ax,
f_nx_10 = f_nx_10,
f_ny_10 = f_ny_10,
f_nz_10 = f_nz_10,
f_x_loc_10 = f_x_loc_10,
f_y_loc_10 = f_y_loc_10,
f_z_loc_10 = f_z_loc_10,
alpha=alpha)
f_loop_counter_10 = 0
f_loop_data_10 = {}
def flap_plot_array_10(data_array,pts_array,**kwargs):
global f_loop_counter_10,f_loop_data_10
f_ax = kwargs['axis']
f_nx_10 = kwargs['f_nx_10']
f_ny_10 = kwargs['f_ny_10']
f_nz_10 = kwargs['f_nz_10']
f_x_loc_10 = kwargs['f_x_loc_10']
f_y_loc_10 = kwargs['f_y_loc_10']
f_z_loc_10 = kwargs['f_z_loc_10']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_10[f_loop_counter_10] = (chord_array,cp_array)
f_loop_counter_10 += 1
#---------------11
def f_plot_cp_profile_11(f_ax,file_root,f_nx_11,f_ny_11,f_nz_11,f_x_loc_11,f_y_loc_11,f_z_loc_11):
force_data = cp_profile_wall_from_file(file_root,
[f_nx_11,f_ny_11,f_nz_11], # the normal of the plane -----to revise
[f_x_loc_11,f_y_loc_11,f_z_loc_11], # points definition
func=flap_plot_array_11,
axis=f_ax,
f_nx_11 = f_nx_11,
f_ny_11 = f_ny_11,
f_nz_11 = f_nz_11,
f_x_loc_11 = f_x_loc_11,
f_y_loc_11 = f_y_loc_11,
f_z_loc_11 = f_z_loc_11,
alpha=alpha)
f_loop_counter_11 = 0
f_loop_data_11 = {}
def flap_plot_array_11(data_array,pts_array,**kwargs):
global f_loop_counter_11,f_loop_data_11
f_ax = kwargs['axis']
f_nx_11 = kwargs['f_nx_11']
f_ny_11 = kwargs['f_ny_11']
f_nz_11 = kwargs['f_nz_11']
f_x_loc_11 = kwargs['f_x_loc_11']
f_y_loc_11 = kwargs['f_y_loc_11']
f_z_loc_11 = kwargs['f_z_loc_11']
cp_array = data_array.GetPointData()['cp']
chord_array = data_array.GetPointData()['chord']
f_ax.plot(chord_array, cp_array , 'b.',color='b',label='zCFD SST')
f_loop_data_11[f_loop_counter_11] = (chord_array,cp_array)
f_loop_counter_11 += 1
In [16]:
from zutil.post import get_case_root
# SLAT POSITIONS
s_x_loc_1 = 1128.5257830070 ; s_y_loc_1 = -213.764 ; s_z_loc_1 = -54.987 ;
s_x_loc_2 = 1252.6898829811 ; s_y_loc_2 = -407.515 ; s_z_loc_2 = -49.951 ;
s_x_loc_4 = 1393.4388029500 ; s_y_loc_4 = -632.53 ; s_z_loc_4 = -35.956 ;
s_x_loc_5 = 1475.6542901294 ; s_y_loc_5 = -763.513 ; s_z_loc_5 = -27.997 ;
s_x_loc_6 = 1596.4087811939 ; s_y_loc_6 = -955.929 ; s_z_loc_6 = -16.246 ;
s_x_loc_7 = 1626.6927045299 ; s_y_loc_7 = -1004.247 ; s_z_loc_7 = -13.28 ;
s_x_loc_8 = 1658.0724766097 ; s_y_loc_8 = -1054.277 ; s_z_loc_8 = -10.20 ;
s_x_loc_9 = 1717.2411764284 ; s_y_loc_9 = -1148.618 ; s_z_loc_9 = -4.364 ;
s_x_loc_10 = 1781.1352303004 ; s_y_loc_10 = -1250.389 ; s_z_loc_10 = 1.984 ;
s_x_loc_11 = 1845.2888081300 ; s_y_loc_11 = -1352.433 ; s_z_loc_11 = 8.402 ;
fig1 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig2 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig4 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig5 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig6 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig7 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig8 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig9 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig10 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig11 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
fig1.suptitle('PS1', fontsize=30, fontweight='bold')
fig2.suptitle('PS2', fontsize=30, fontweight='bold')
fig4.suptitle('PS4', fontsize=30, fontweight='bold')
fig5.suptitle('PS5', fontsize=30, fontweight='bold')
fig6.suptitle('PS6', fontsize=30, fontweight='bold')
fig7.suptitle('PS7', fontsize=30, fontweight='bold')
fig8.suptitle('PS8', fontsize=30, fontweight='bold')
fig9.suptitle('PS9', fontsize=30, fontweight='bold')
fig10.suptitle('PS10', fontsize=30, fontweight='bold')
fig11.suptitle('PS11', fontsize=30, fontweight='bold')
ax = fig1.add_subplot(2,1,1)
ax2 = fig2.add_subplot(2,1,1)
ax4 = fig4.add_subplot(2,1,1)
ax5 = fig5.add_subplot(2,1,1)
ax6 = fig6.add_subplot(2,1,1)
ax7 = fig7.add_subplot(2,1,1)
ax8 = fig8.add_subplot(2,1,1)
ax9 = fig9.add_subplot(2,1,1)
ax10 = fig10.add_subplot(2,1,1)
ax11 = fig11.add_subplot(2,1,1)
ax.grid(True)
ax.set_xlabel('x/c')
ax.set_ylabel('Cp []')
ax.axis([0,1.1,-5,5])
ax2.axis([0,1.1,-5,5])
ax4.axis([0,1.1,-5,5])
ax5.axis([0,1.1,-5,5])
ax6.axis([0,1.1,-5,5])
ax7.axis([0,1.1,-5,5])
ax8.axis([0,1.1,-5,5])
ax9.axis([0,1.1,-5,5])
ax10.axis([0,1.1,-5,5])
ax11.axis([0,1.1,-5,5])
# SELECT THE LOOPS OF INTEREST AND NORMALIZE THEM
# PS 1
slat_plot_cp_profile_1(ax,get_case_root(case_name,num_procs),s_x_loc_1,s_y_loc_1,s_z_loc_1)
ax.plot(s_loop_data_1[0][0],s_loop_data_1[0][1], color='r', markersize=20)
slat_plot_cp_profile_2(ax2,get_case_root(case_name,num_procs),s_x_loc_2,s_y_loc_2,s_z_loc_2)
ax2.plot(s_loop_data_2[0][0],s_loop_data_2[0][1], color='r', markersize=20)
slat_plot_cp_profile_4(ax4,get_case_root(case_name,num_procs),s_x_loc_4,s_y_loc_4,s_z_loc_4)
ax4.plot(s_loop_data_4[2][0],s_loop_data_4[2][1], color='r', markersize=20)
# in this case the third block in the loop data dictionary is the slat
slat_plot_cp_profile_5(ax5,get_case_root(case_name,num_procs),s_x_loc_5,s_y_loc_5,s_z_loc_5)
ax5.plot(s_loop_data_5[2][0],s_loop_data_5[2][1], color='r', markersize=20)
# in this case the third block in the loop data dictionary is the slat
slat_plot_cp_profile_6(ax6,get_case_root(case_name,num_procs),s_x_loc_6,s_y_loc_6,s_z_loc_6)
ax6.plot(s_loop_data_6[2][0],s_loop_data_6[2][1], color='r', markersize=20)
slat_plot_cp_profile_7(ax7,get_case_root(case_name,num_procs),s_x_loc_7,s_y_loc_7,s_z_loc_7)
ax7.plot(s_loop_data_7[2][0],s_loop_data_7[2][1], color='r', markersize=20)
slat_plot_cp_profile_8(ax8,get_case_root(case_name,num_procs),s_x_loc_8,s_y_loc_8,s_z_loc_8)
ax8.plot(s_loop_data_8[2][0],s_loop_data_8[2][1], color='r', markersize=20)
slat_plot_cp_profile_9(ax9,get_case_root(case_name,num_procs),s_x_loc_9,s_y_loc_9,s_z_loc_9)
ax9.plot(s_loop_data_9[2][0],s_loop_data_9[2][1], color='r', markersize=20)
slat_plot_cp_profile_10(ax10,get_case_root(case_name,num_procs),s_x_loc_10,s_y_loc_10,s_z_loc_10)
ax10.plot(s_loop_data_10[0][0],s_loop_data_10[0][1], color='r', markersize=20)
slat_plot_cp_profile_11(ax11,get_case_root(case_name,num_procs),s_x_loc_10,s_y_loc_10,s_z_loc_10)
ax11.plot(s_loop_data_11[0][0],s_loop_data_11[0][1], color='r', markersize=20)
# SELECT THE LOOPS OF INTEREST AND NORMALIZE THEM
#ps1
s_min_loop_1 = min(s_loop_data_1[0][0]); s_max_loop_1 = max(s_loop_data_1[0][0]);
s_norm_loop_1 = np.zeros(len(s_loop_data_1[0][0])) ;
s_d1 = s_max_loop_1-s_min_loop_1 ;
for i in range (0,len(s_loop_data_1[0][0])):
s_norm_loop_1[i] = (s_loop_data_1[0][0][i]-s_min_loop_1)/s_d1
#ps2
s_min_loop_2 = min(s_loop_data_2[0][0]); s_max_loop_2 = max(s_loop_data_2[0][0]);
s_norm_loop_2 = np.zeros(len(s_loop_data_2[0][0])) ;
s_d2 = s_max_loop_2-s_min_loop_2 ;
for j in range (0,len(s_loop_data_2[0][0])):
s_norm_loop_2[j] = (s_loop_data_2[0][0][j]-s_min_loop_2)/s_d2
#ps4
s_min_loop_4 = min(s_loop_data_4[2][0]); s_max_loop_4 = max(s_loop_data_4[2][0]);
s_norm_loop_4 = np.zeros(len(s_loop_data_4[2][0])) ;
s_d4 = s_max_loop_4-s_min_loop_4 ;
for i in range (0,len(s_loop_data_4[2][0])):
s_norm_loop_4[i] = (s_loop_data_4[2][0][i]-s_min_loop_4)/s_d4
#ps5
s_min_loop_5 = min(s_loop_data_5[2][0]); s_max_loop_5 = max(s_loop_data_5[2][0]);
s_norm_loop_5 = np.zeros(len(s_loop_data_5[2][0])) ;
s_d5 = s_max_loop_5-s_min_loop_5 ;
for i in range (0,len(s_loop_data_5[2][0])):
s_norm_loop_5[i] = (s_loop_data_5[2][0][i]-s_min_loop_5)/s_d5
#ps6
s_min_loop_6 = min(s_loop_data_6[2][0]); s_max_loop_6 = max(s_loop_data_6[2][0]);
s_norm_loop_6 = np.zeros(len(s_loop_data_6[2][0])) ;
s_d6 = s_max_loop_6-s_min_loop_6 ;
for i in range (0,len(s_loop_data_6[2][0])):
s_norm_loop_6[i] = (s_loop_data_6[2][0][i]-s_min_loop_6)/s_d6
#ps7
s_min_loop_7 = min(s_loop_data_7[2][0]); s_max_loop_7 = max(s_loop_data_7[2][0]);
s_norm_loop_7 = np.zeros(len(s_loop_data_7[2][0])) ;
s_d7 = s_max_loop_7-s_min_loop_7 ;
for i in range (0,len(s_loop_data_7[2][0])):
s_norm_loop_7[i] = (s_loop_data_7[2][0][i]-s_min_loop_7)/s_d7
#ps8
s_min_loop_8 = min(s_loop_data_8[2][0]); s_max_loop_8 = max(s_loop_data_8[2][0]);
s_norm_loop_8 = np.zeros(len(s_loop_data_8[2][0])) ;
s_d8 = s_max_loop_8-s_min_loop_8 ;
for i in range (0,len(s_loop_data_8[2][0])):
s_norm_loop_8[i] = (s_loop_data_8[2][0][i]-s_min_loop_8)/s_d8
#ps9
s_min_loop_9 = min(s_loop_data_9[2][0]); s_max_loop_9 = max(s_loop_data_9[2][0]);
s_norm_loop_9 = np.zeros(len(s_loop_data_9[2][0])) ;
s_d9 = s_max_loop_9-s_min_loop_9 ;
for i in range (0,len(s_loop_data_9[2][0])):
s_norm_loop_9[i] = (s_loop_data_9[2][0][i]-s_min_loop_9)/s_d9
#ps10
s_min_loop_10 = min(s_loop_data_10[0][0]); s_max_loop_10 = max(s_loop_data_10[0][0]);
s_norm_loop_10 = np.zeros(len(s_loop_data_10[0][0])) ;
s_d10 = s_max_loop_10-s_min_loop_10 ;
for i in range (0,len(s_loop_data_10[0][0])):
s_norm_loop_10[i] = (s_loop_data_10[0][0][i]-s_min_loop_10)/s_d10
#ps11
s_min_loop_11 = min(s_loop_data_11[0][0]); s_max_loop_11 = max(s_loop_data_11[0][0]);
s_norm_loop_11 = np.zeros(len(s_loop_data_11[0][0])) ;
s_d11 = s_max_loop_11-s_min_loop_11 ;
for i in range (0,len(s_loop_data_11[0][0])):
s_norm_loop_11[i] = (s_loop_data_11[0][0][i]-s_min_loop_11)/s_d11
# the data is stored in loop_data
# For each loop calculate min/max x. Locate the vector in the matrix i.e [0][0] [0][1] .........
#min_loop_1 = min(s_loop_data[0][0])
#max_loop_1 = max(s_loop_data[0][0])
#print min_loop_1
#print max_loop_1
#norm_loop_1 = np.zeros(len(loop_data[0][0]))
# Normalise x coordinate
#distancee_l = max_loop_1 - min_loop_1
#print distancee_l
#for i in range(0,len(loop_data[0][0])-1):
# norm_loop_1[i] = (loop_data[0][0][i] - min_loop_1)/(max_loop_1 - min_loop_1)
#print norm_loop_1
#print len(norm_loop_1)
#print loop_data[0][0]
In [17]:
from zutil.post import get_case_root
w_span_loc_1 = -209.67 ; w_span_loc_2 = -403.87 ; w_span_loc_4 = -629.14 ; w_span_loc_5 = -760.30 ;w_span_loc_6 = -952.95 ;
w_span_loc_7 = -1001.28; w_span_loc_8 = -1051.35; w_span_loc_9 = -1145.79; w_span_loc_10 = -1247.68; w_span_loc_11 = -1348.83 ;
w_fig1 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig2 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig4 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig5 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig6 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig7 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig8 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig9 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig10 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig11 = pl.figure(figsize=(20, 15),dpi=600, facecolor='w', edgecolor='k')
w_fig1.suptitle('PS1', fontsize=30, fontweight='bold')
w_fig2.suptitle('PS2', fontsize=30, fontweight='bold')
w_fig4.suptitle('PS4', fontsize=30, fontweight='bold')
w_fig5.suptitle('PS5', fontsize=30, fontweight='bold')
w_fig6.suptitle('PS6', fontsize=30, fontweight='bold')
w_fig7.suptitle('PS7', fontsize=30, fontweight='bold')
w_fig8.suptitle('PS8', fontsize=30, fontweight='bold')
w_fig9.suptitle('PS9', fontsize=30, fontweight='bold')
w_fig10.suptitle('PS10', fontsize=30, fontweight='bold')
w_fig11.suptitle('PS11', fontsize=30, fontweight='bold')
w_ax =w_fig1.add_subplot(2,1,1)
w_ax2 = w_fig2.add_subplot(2,1,1)
w_ax4 = w_fig4.add_subplot(2,1,1)
w_ax5 = w_fig5.add_subplot(2,1,1)
w_ax6 = w_fig6.add_subplot(2,1,1)
w_ax7 = w_fig7.add_subplot(2,1,1)
w_ax8 = w_fig8.add_subplot(2,1,1)
w_ax9 = w_fig9.add_subplot(2,1,1)
w_ax10 = w_fig10.add_subplot(2,1,1)
w_ax11 = w_fig11.add_subplot(2,1,1)
w_ax.grid(True)
w_ax.set_xlabel('x/c')
w_ax.set_ylabel('Cp []')
w_ax.axis([0,1.1,-5,5])
w_ax2.axis([0,1.1,-5,5])
w_ax4.axis([0,1.1,-5,5])
w_ax5.axis([0,1.1,-5,5])
w_ax6.axis([0,1.1,-5,5])
w_ax7.axis([0,1.1,-5,5])
w_ax8.axis([0,1.1,-5,5])
w_ax9.axis([0,1.1,-5,5])
w_ax10.axis([0,1.1,-5,5])
w_ax11.axis([0,1.1,-5,5])
# the wing is in the 0th loop for the 6 9 10
wing_plot_cp_profile_1(w_ax,get_case_root(case_name,num_procs),w_span_loc_1)
w_ax.plot(w_loop_data_1[1][0],w_loop_data_1[1][1], color='r', markersize=20)
wing_plot_cp_profile_2(w_ax2,get_case_root(case_name,num_procs),w_span_loc_2)
w_ax2.plot(w_loop_data_2[1][0],w_loop_data_2[1][1], color='r', markersize=20)
wing_plot_cp_profile_4(w_ax4,get_case_root(case_name,num_procs),w_span_loc_4)
w_ax4.plot(w_loop_data_4[1][0],w_loop_data_4[1][1], color='r', markersize=20)
wing_plot_cp_profile_5(w_ax5,get_case_root(case_name,num_procs),w_span_loc_5)
w_ax5.plot(w_loop_data_5[1][0],w_loop_data_5[1][1], color='r', markersize=20)
wing_plot_cp_profile_6(w_ax6,get_case_root(case_name,num_procs),w_span_loc_6)
w_ax6.plot(w_loop_data_6[1][0],w_loop_data_6[1][1], color='r', markersize=20)
wing_plot_cp_profile_7(w_ax7,get_case_root(case_name,num_procs),w_span_loc_7)
w_ax7.plot(w_loop_data_7[1][0],w_loop_data_7[1][1], color='r', markersize=20)
wing_plot_cp_profile_8(w_ax8,get_case_root(case_name,num_procs),w_span_loc_8)
w_ax8.plot(w_loop_data_8[1][0],w_loop_data_8[1][1], color='r', markersize=20)
wing_plot_cp_profile_9(w_ax9,get_case_root(case_name,num_procs),w_span_loc_9)
w_ax9.plot(w_loop_data_9[1][0],w_loop_data_9[1][1], color='r', markersize=20)
wing_plot_cp_profile_10(w_ax10,get_case_root(case_name,num_procs),w_span_loc_10)
w_ax10.plot(w_loop_data_10[0][0],w_loop_data_10[0][1], color='r', markersize=20)
wing_plot_cp_profile_11(w_ax11,get_case_root(case_name,num_procs),w_span_loc_11)
w_ax11.plot(w_loop_data_11[1][0],w_loop_data_11[1][1], color='r', markersize=20)
# SELECT THE LOOPS OF INTEREST AND NORMALIZE THEM
# the wing is in the 0th loop for the 6 9 10
#ps1
w_min_loop_1 = min(w_loop_data_1[1][0]); w_max_loop_1 = max(w_loop_data_1[1][0]);
w_norm_loop_1 = np.zeros(len(w_loop_data_1[1][0])) ;
w_d1 = w_max_loop_1-w_min_loop_1 ;
for i in range (0,len(w_loop_data_1[1][0])):
w_norm_loop_1[i] = (w_loop_data_1[1][0][i]-w_min_loop_1)/w_d1
#ps2
w_min_loop_2 = min(w_loop_data_2[1][0]); w_max_loop_2 = max(w_loop_data_1[1][0]);
w_norm_loop_2 = np.zeros(len(w_loop_data_2[1][0])) ;
w_d2 = w_max_loop_2-w_min_loop_2 ;
for i in range (0,len(w_loop_data_2[1][0])):
w_norm_loop_2[i] = (w_loop_data_2[1][0][i]-w_min_loop_2)/w_d2
#ps4
w_min_loop_4 = min(w_loop_data_4[1][0]); w_max_loop_4 = max(w_loop_data_4[1][0]);
w_norm_loop_4 = np.zeros(len(w_loop_data_4[1][0])) ;
w_d4 = w_max_loop_4-w_min_loop_4 ;
for i in range (0,len(w_loop_data_4[1][0])):
w_norm_loop_4[i] = (w_loop_data_4[1][0][i]-w_min_loop_4)/w_d4
#ps5
w_min_loop_5 = min(w_loop_data_5[1][0]); w_max_loop_5 = max(w_loop_data_5[1][0]);
w_norm_loop_5 = np.zeros(len(w_loop_data_5[1][0])) ;
w_d5 = w_max_loop_5-w_min_loop_5 ;
for i in range (0,len(w_loop_data_5[1][0])):
w_norm_loop_5[i] = (w_loop_data_5[1][0][i]-w_min_loop_5)/w_d5
#ps6
w_min_loop_6 = min(w_loop_data_6[1][0]); w_max_loop_6 = max(w_loop_data_6[1][0]);
w_norm_loop_6 = np.zeros(len(w_loop_data_6[1][0])) ;
w_d6 = w_max_loop_6-w_min_loop_6 ;
for i in range (0,len(w_loop_data_6[1][0])):
w_norm_loop_6[i] = (w_loop_data_6[1][0][i]-w_min_loop_6)/w_d6
#ps7
w_min_loop_7 = min(w_loop_data_7[1][0]); w_max_loop_7 = max(w_loop_data_7[1][0]);
w_norm_loop_7 = np.zeros(len(w_loop_data_7[1][0])) ;
w_d7 = w_max_loop_7-w_min_loop_7 ;
for i in range (0,len(w_loop_data_7[1][0])):
w_norm_loop_7[i] = (w_loop_data_7[1][0][i]-w_min_loop_7)/w_d7
#ps8
w_min_loop_8 = min(w_loop_data_8[1][0]); w_max_loop_8 = max(w_loop_data_8[1][0]);
w_norm_loop_8 = np.zeros(len(w_loop_data_8[1][0])) ;
w_d8 = w_max_loop_8-w_min_loop_8 ;
for i in range (0,len(w_loop_data_8[1][0])):
w_norm_loop_8[i] = (w_loop_data_8[1][0][i]-w_min_loop_8)/w_d8
#ps9
w_min_loop_9 = min(w_loop_data_9[1][0]); w_max_loop_9 = max(w_loop_data_9[1][0]);
w_norm_loop_9 = np.zeros(len(w_loop_data_9[1][0])) ;
w_d9 = w_max_loop_9-w_min_loop_9 ;
for i in range (0,len(w_loop_data_9[1][0])):
w_norm_loop_9[i] = (w_loop_data_9[1][0][i]-w_min_loop_9)/w_d9
#ps10
w_min_loop_10 = min(w_loop_data_10[0][0]); w_max_loop_10 = max(w_loop_data_10[0][0]);
w_norm_loop_10 = np.zeros(len(w_loop_data_10[0][0])) ;
w_d10 = w_max_loop_10-w_min_loop_10 ;
for i in range (0,len(w_loop_data_10[0][0])):
w_norm_loop_10[i] = (w_loop_data_10[0][0][i]-w_min_loop_10)/w_d10
#ps11
w_min_loop_11 = min(w_loop_data_11[1][0]); w_max_loop_11 = max(w_loop_data_11[1][0]);
w_norm_loop_11 = np.zeros(len(w_loop_data_11[1][0])) ;
w_d11 = w_max_loop_11-w_min_loop_11 ;
for i in range (0,len(w_loop_data_11[1][0])):
w_norm_loop_11[i] = (w_loop_data_11[1][0][i]-w_min_loop_11)/w_d11
In [18]:
from zutil.post import get_case_root
# normals
f_nx_1 = 0.003629 ; f_ny_1 = 0.996368 ; f_nz_1 = 0.085077 ;
f_nx_2 = 0.003626 ; f_ny_2 = 0.996367 ; f_nz_2 = 0.085081 ;
f_nx_4 = 0.000246 ; f_ny_4 = 0.989663 ; f_nz_4 = 0.143413 ;
f_nx_5 = 0.000241 ; f_ny_5 = 0.989664 ; f_nz_5 = 0.143404 ;
f_nx_6 = 0.000247 ; f_ny_6 = 0.989663 ; f_nz_6 = 0.143415 ;
f_nx_7 = 0.000229 ; f_ny_7 = 0.989666 ; f_nz_7 = 0.143389 ;
f_nx_8 = 0.000244 ; f_ny_8 = 0.990009 ; f_nz_8 = 0.141001 ;
f_nx_9 = 0.000193 ; f_ny_9 = 0.990019 ; f_nz_9 = 0.140931 ;
f_nx_10 = 0.000301 ; f_ny_10 = 0.989998 ; f_nz_10 = 0.141080 ;
f_nx_11 = 0.000256 ; f_ny_11 = 0.990007 ; f_nz_11 = 0.141018 ;
# points which define the cutting planes nebdeac
f_x_loc_1 = 1633.0167311083 ; f_y_loc_1 = -213.9810000000 ; f_z_loc_1 = -110.2460000000;
f_x_loc_2 = 1652.6042432698 ; f_y_loc_2 = -407.4420000000 ; f_z_loc_2 = -91.5960000000;
f_x_loc_4 = 1668.8232828954 ; f_y_loc_4 = -633.7100000000 ; f_z_loc_4 = -67.7010000000;
f_x_loc_5 = 1719.6203614083 ; f_y_loc_5 = -764.5860000000 ; f_z_loc_5 = -54.8240000000;
f_x_loc_6 = 1793.8206003685 ; f_y_loc_6 = -956.6800000000 ; f_z_loc_6 = -34.7680000000;
f_x_loc_7 = 1809.4990162299 ; f_y_loc_7 = -1004.9670000000 ; f_z_loc_7 = -30.0750000000;
f_x_loc_8 = 1829.0543532948 ; f_y_loc_8 = -1053.2090000000 ; f_z_loc_8 = -21.8780000000;
f_x_loc_9 = 1855.0727180180 ; f_y_loc_9 = -1147.3930000000 ; f_z_loc_9 = -12.1070000000;
f_x_loc_10 = 1916.7026744926 ; f_y_loc_10 = -1249.1220000000 ; f_z_loc_10 = -2.459000000 ;
f_x_loc_11 = 1949.5082093248 ; f_y_loc_11 = -1351.2150000000 ; f_z_loc_11 = 6.5750000000 ;
f_fig1 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig2 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig4 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig5 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig6 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig7 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig8 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig9 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig10 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig11 = pl.figure(figsize=(20, 10),dpi=600, facecolor='w', edgecolor='k')
f_fig1.suptitle('PS1', fontsize=30, fontweight='bold')
f_fig2.suptitle('PS2', fontsize=30, fontweight='bold')
f_fig4.suptitle('PS4', fontsize=30, fontweight='bold')
f_fig5.suptitle('PS5', fontsize=30, fontweight='bold')
f_fig6.suptitle('PS6', fontsize=30, fontweight='bold')
f_fig7.suptitle('PS7', fontsize=30, fontweight='bold')
f_fig8.suptitle('PS8', fontsize=30, fontweight='bold')
f_fig9.suptitle('PS9', fontsize=30, fontweight='bold')
f_fig10.suptitle('PS10', fontsize=30, fontweight='bold')
f_fig11.suptitle('PS11', fontsize=30, fontweight='bold')
f_ax =f_fig1.add_subplot(2,1,1)
f_ax2 = f_fig2.add_subplot(2,1,1)
f_ax4 = f_fig4.add_subplot(2,1,1)
f_ax5 = f_fig5.add_subplot(2,1,1)
f_ax6 = f_fig6.add_subplot(2,1,1)
f_ax7 = f_fig7.add_subplot(2,1,1)
f_ax8 = f_fig8.add_subplot(2,1,1)
f_ax9 = f_fig9.add_subplot(2,1,1)
f_ax10 = f_fig10.add_subplot(2,1,1)
f_ax11 = f_fig11.add_subplot(2,1,1)
f_ax.grid(True)
f_ax.set_xlabel('x/c')
f_ax.set_ylabel('Cp []')
f_ax.axis([0,1.1,-5,5])
f_ax2.axis([0,1.1,-5,5])
f_ax4.axis([0,1.1,-5,5])
f_ax5.axis([0,1.1,-5,5])
f_ax6.axis([0,1.1,-5,5])
f_ax7.axis([0,1.1,-5,5])
f_ax8.axis([0,1.1,-5,5])
f_ax9.axis([0,1.1,-5,5])
f_ax10.axis([0,1.1,-5,5])
f_ax11.axis([0,1.1,-5,5])
# the wing is in the 0th loop for the 6 9 10
f_plot_cp_profile_1(f_ax,get_case_root(case_name,num_procs),f_nx_1,f_ny_1,f_nz_1,f_x_loc_1,f_y_loc_1,f_z_loc_1) #ok
f_plot_cp_profile_2(f_ax2,get_case_root(case_name,num_procs),f_nx_2,f_ny_2,f_nz_2,f_x_loc_2,f_y_loc_2,f_z_loc_2) # ok
f_plot_cp_profile_4(f_ax4,get_case_root(case_name,num_procs),f_nx_4,f_ny_4,f_nz_4,f_x_loc_4,f_y_loc_4,f_z_loc_4) # ok
f_plot_cp_profile_5(f_ax5,get_case_root(case_name,num_procs),f_nx_5,f_ny_5,f_nz_5,f_x_loc_5,f_y_loc_5,f_z_loc_5) # ok
f_plot_cp_profile_6(f_ax6,get_case_root(case_name,num_procs),f_nx_6,f_ny_6,f_nz_6,f_x_loc_6,f_y_loc_6,f_z_loc_6) # ok
f_plot_cp_profile_7(f_ax7,get_case_root(case_name,num_procs),f_nx_7,f_ny_7,f_nz_7,f_x_loc_7,f_y_loc_7,f_z_loc_7) # ok
f_plot_cp_profile_8(f_ax8,get_case_root(case_name,num_procs),f_nx_8,f_ny_8,f_nz_8,f_x_loc_8,f_y_loc_8,f_z_loc_8) # ok
f_plot_cp_profile_9(f_ax9,get_case_root(case_name,num_procs),f_nx_9,f_ny_9,f_nz_9,f_x_loc_9,f_y_loc_9,f_z_loc_9) # ok
f_plot_cp_profile_10(f_ax10,get_case_root(case_name,num_procs),f_nx_10,f_ny_10,f_nz_10,f_x_loc_10,f_y_loc_10,f_z_loc_10) # ok
f_plot_cp_profile_11(f_ax11,get_case_root(case_name,num_procs),f_nx_11,f_ny_11,f_nz_11,f_x_loc_11,f_y_loc_11,f_z_loc_11) # not
f_ax.plot(f_loop_data_1[2][0],f_loop_data_1[2][1], color='r', markersize=20)
f_ax2.plot(f_loop_data_2[2][0],f_loop_data_2[2][1], color='r', markersize=20)
f_ax4.plot(f_loop_data_4[0][0],f_loop_data_4[0][1], color='r', markersize=20)
f_ax5.plot(f_loop_data_5[0][0],f_loop_data_5[0][1], color='r', markersize=20)
f_ax6.plot(f_loop_data_6[0][0],f_loop_data_6[0][1], color='r', markersize=20)
f_ax7.plot(f_loop_data_7[0][0],f_loop_data_7[0][1], color='r', markersize=20)
f_ax8.plot(f_loop_data_8[0][0],f_loop_data_8[0][1], color='r', markersize=20)
f_ax9.plot(f_loop_data_9[0][0],f_loop_data_9[0][1], color='r', markersize=20)
f_ax10.plot(f_loop_data_10[2][0],f_loop_data_10[2][1], color='r', markersize=20)
f_ax11.plot(f_loop_data_11[2][0],f_loop_data_11[2][1], color='r', markersize=20)
# SELECT THE LOOPS OF INTEREST AND NORMALIZE THEM
# select the rigth loop for the flap
#ps1
f_min_loop_1 = min(f_loop_data_1[2][0]); f_max_loop_1 = max(f_loop_data_1[2][0]);
f_norm_loop_1 = np.zeros(len(f_loop_data_1[2][0])) ;
f_d1 = f_max_loop_1-f_min_loop_1 ;
for i in range (0,len(f_loop_data_1[2][0])):
f_norm_loop_1[i] = (f_loop_data_1[2][0][i]-f_min_loop_1)/f_d1
#ps2
f_min_loop_2 = min(f_loop_data_2[2][0]); f_max_loop_2 = max(f_loop_data_2[2][0]);
f_norm_loop_2 = np.zeros(len(f_loop_data_2[2][0])) ;
f_d2 = f_max_loop_2-f_min_loop_2 ;
for i in range (0,len(f_loop_data_2[2][0])):
f_norm_loop_2[i] = (f_loop_data_2[2][0][i]-f_min_loop_2)/f_d2
#ps4
f_min_loop_4 = min(f_loop_data_4[0][0]); f_max_loop_4 = max(f_loop_data_4[0][0]);
f_norm_loop_4 = np.zeros(len(f_loop_data_4[0][0])) ;
f_d4 = f_max_loop_4-f_min_loop_4 ;
for i in range (0,len(f_loop_data_4[0][0])):
f_norm_loop_4[i] = (f_loop_data_4[0][0][i]-f_min_loop_4)/f_d4
#ps5
f_min_loop_5 = min(f_loop_data_5[0][0]); f_max_loop_5 = max(f_loop_data_5[0][0]);
f_norm_loop_5 = np.zeros(len(f_loop_data_5[0][0])) ;
f_d5 = f_max_loop_5-f_min_loop_5 ;
for i in range (0,len(f_loop_data_5[0][0])):
f_norm_loop_5[i] = (f_loop_data_5[0][0][i]-f_min_loop_5)/f_d5
#ps6
f_min_loop_6 = min(f_loop_data_6[0][0]); f_max_loop_6 = max(f_loop_data_6[0][0]);
f_norm_loop_6 = np.zeros(len(f_loop_data_6[0][0])) ;
f_d6 = f_max_loop_6-f_min_loop_6 ;
for i in range (0,len(f_loop_data_6[0][0])):
f_norm_loop_6[i] = (f_loop_data_6[0][0][i]-f_min_loop_6)/f_d6
#ps7
f_min_loop_7 = min(f_loop_data_7[0][0]); f_max_loop_7 = max(f_loop_data_7[0][0]);
f_norm_loop_7 = np.zeros(len(f_loop_data_7[0][0])) ;
f_d7 = f_max_loop_7-f_min_loop_7 ;
for i in range (0,len(f_loop_data_7[0][0])):
f_norm_loop_7[i] = (f_loop_data_7[0][0][i]-f_min_loop_7)/f_d7
#ps8
f_min_loop_8 = min(f_loop_data_8[0][0]); f_max_loop_8 = max(f_loop_data_8[0][0]);
f_norm_loop_8 = np.zeros(len(f_loop_data_8[0][0])) ;
f_d8 = f_max_loop_8-f_min_loop_8 ;
for i in range (0,len(f_loop_data_8[0][0])):
f_norm_loop_8[i] = (f_loop_data_8[0][0][i]-f_min_loop_8)/f_d8
#ps9
f_min_loop_9 = min(f_loop_data_9[0][0]); f_max_loop_9 = max(f_loop_data_9[0][0]);
f_norm_loop_9 = np.zeros(len(f_loop_data_9[0][0])) ;
f_d9 = f_max_loop_1-f_min_loop_9 ;
for i in range (0,len(f_loop_data_9[0][0])):
f_norm_loop_9[i] = (f_loop_data_9[0][0][i]-f_min_loop_9)/f_d9
#ps10
f_min_loop_10 = min(f_loop_data_10[2][0]); f_max_loop_10 = max(f_loop_data_10[2][0]);
f_norm_loop_10 = np.zeros(len(f_loop_data_10[2][0])) ;
f_d10 = f_max_loop_10-f_min_loop_10 ;
for i in range (0,len(f_loop_data_10[2][0])):
f_norm_loop_10[i] = (f_loop_data_10[2][0][i]-f_min_loop_10)/f_d10
#ps11
f_min_loop_11 = min(f_loop_data_11[2][0]); f_max_loop_11 = max(f_loop_data_11[2][0]);
f_norm_loop_11 = np.zeros(len(f_loop_data_11[2][0])) ;
f_d11 = f_max_loop_11-f_min_loop_11 ;
for i in range (0,len(f_loop_data_11[2][0])):
f_norm_loop_11[i] = (f_loop_data_11[2][0][i]-f_min_loop_11)/f_d11
In [29]:
import zutil
import zutil.post as post
#reload(zutil)
#reload(post)
from zutil.post import get_csv_data
import os
import glob
###import the SLAT cut
slat_15 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_15_coarse.csv"
,header=True,remote=True,delim=',')
slat_29 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_29_coarse.csv"
,header=True,remote=True,delim=',')
slat_45 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_45_coarse.csv"
,header=True,remote=True,delim=',')
slat_54 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_54_coarse.csv"
,header=True,remote=True,delim=',')
slat_68 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_68_coarse.csv"
,header=True,remote=True,delim=',')
slat_72 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_72_coarse.csv"
,header=True,remote=True,delim=',')
slat_75 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_75_coarse.csv"
,header=True,remote=True,delim=',')
slat_82 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_82_coarse.csv"
,header=True,remote=True,delim=',')
slat_89 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_89_coarse.csv"
,header=True,remote=True,delim=',')
slat_96 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/slat_96_coarse.csv"
,header=True,remote=True,delim=',')
### import the flap data
flap_15 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_15_coarse.csv"
,header=True,remote=True,delim=',')
flap_29 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_29_coarse.csv"
,header=True,remote=True,delim=',')
flap_45 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_45_coarse.csv"
,header=True,remote=True,delim=',')
flap_54 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_54_coarse.csv"
,header=True,remote=True,delim=',')
flap_68 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_68_coarse.csv"
,header=True,remote=True,delim=',')
flap_72 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_72_coarse.csv"
,header=True,remote=True,delim=',')
flap_75 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_75_coarse.csv"
,header=True,remote=True,delim=',')
flap_82 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_82_coarse.csv"
,header=True,remote=True,delim=',')
flap_89 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_89_coarse.csv"
,header=True,remote=True,delim=',')
flap_96 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/flap_96_coarse.csv"
,header=True,remote=True,delim=',')
wing_15 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_15_coarse.csv"
,header=True,remote=True,delim=',')
wing_29 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_29_coarse.csv"
,header=True,remote=True,delim=',')
wing_45 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_45_coarse.csv"
,header=True,remote=True,delim=',')
wing_54 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_54_coarse.csv"
,header=True,remote=True,delim=',')
wing_68 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_68_coarse.csv"
,header=True,remote=True,delim=',')
wing_72 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_72_coarse.csv"
,header=True,remote=True,delim=',')
wing_75 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_75_coarse.csv"
,header=True,remote=True,delim=',')
wing_82 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_82_coarse.csv"
,header=True,remote=True,delim=',')
wing_89 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_89_coarse.csv"
,header=True,remote=True,delim=',')
wing_96 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/metacomp_results/wing_96_coarse.csv"
,header=True,remote=True,delim=',')
ns_slat15_d= max(slat_15[0])-min(slat_15[0])
slat_15_x = np.zeros(len(slat_15[0]))
for i in range(0,len(slat_15_x)):
slat_15_x [i] = (slat_15[0][i]-min(slat_15[0]))/ns_slat15_d
ns_slat29_d= max(slat_29[0])-min(slat_29[0])
slat_29_x = np.zeros(len(slat_29[0]))
for i in range(0,len(slat_29_x)):
slat_29_x [i] = (slat_29[0][i]-min(slat_29[0]))/ns_slat29_d
ns_slat45_d= max(slat_45[0])-min(slat_45[0])
slat_45_x = np.zeros(len(slat_45[0]))
for i in range(0,len(slat_45_x)):
slat_45_x [i] = (slat_45[0][i]-min(slat_45[0]))/ns_slat45_d
ns_slat54_d= max(slat_54[0])-min(slat_54[0])
slat_54_x = np.zeros(len(slat_54[0]))
for i in range(0,len(slat_54_x)):
slat_54_x [i] = (slat_54[0][i]-min(slat_54[0]))/ns_slat54_d
ns_slat68_d= max(slat_68[0])-min(slat_68[0])
slat_68_x = np.zeros(len(slat_68[0]))
for i in range(0,len(slat_68_x)):
slat_68_x [i] = (slat_68[0][i]-min(slat_68[0]))/ns_slat68_d
ns_slat72_d= max(slat_72[0])-min(slat_72[0])
slat_72_x = np.zeros(len(slat_72[0]))
for i in range(0,len(slat_72_x)):
slat_72_x [i] = (slat_72[0][i]-min(slat_72[0]))/ns_slat72_d
ns_slat75_d= max(slat_75[0])-min(slat_75[0])
slat_75_x = np.zeros(len(slat_75[0]))
for i in range(0,len(slat_75_x)):
slat_75_x [i] = (slat_75[0][i]-min(slat_75[0]))/ns_slat75_d
ns_slat82_d= max(slat_82[0])-min(slat_82[0])
slat_82_x = np.zeros(len(slat_82[0]))
for i in range(0,len(slat_82_x)):
slat_82_x [i] = (slat_82[0][i]-min(slat_82[0]))/ns_slat82_d
ns_slat89_d= max(slat_89[0])-min(slat_89[0])
slat_89_x = np.zeros(len(slat_89[0]))
for i in range(0,len(slat_89_x)):
slat_89_x [i] = (slat_89[0][i]-min(slat_89[0]))/ns_slat89_d
ns_slat96_d= max(slat_96[0])-min(slat_96[0])
slat_96_x = np.zeros(len(slat_96[0]))
for i in range(0,len(slat_96_x)):
slat_96_x [i] = (slat_96[0][i]-min(slat_96[0]))/ns_slat96_d
#________________________________________________________________
# main wing
ns_wing15_d= max(wing_15[0])-min(wing_15[0])
wing_15_x = np.zeros(len(wing_15[0]))
for i in range(0,len(wing_15_x)):
wing_15_x [i] = (wing_15[0][i]-min(wing_15[0]))/ns_wing15_d
ns_wing29_d= max(wing_29[0])-min(wing_29[0])
wing_29_x = np.zeros(len(wing_29[0]))
for i in range(0,len(wing_29_x)):
wing_29_x [i] = (wing_29[0][i]-min(wing_29[0]))/ns_wing29_d
ns_wing45_d= max(wing_45[0])-min(wing_45[0])
wing_45_x = np.zeros(len(wing_45[0]))
for i in range(0,len(wing_45_x)):
wing_45_x [i] = (wing_45[0][i]-min(wing_45[0]))/ns_wing45_d
ns_wing54_d= max(wing_54[0])-min(wing_54[0])
wing_54_x = np.zeros(len(wing_54[0]))
for i in range(0,len(wing_54_x)):
wing_54_x [i] = (wing_54[0][i]-min(wing_54[0]))/ns_wing54_d
ns_wing68_d= max(wing_68[0])-min(wing_68[0])
wing_68_x = np.zeros(len(wing_68[0]))
for i in range(0,len(wing_68_x)):
wing_68_x [i] = (wing_68[0][i]-min(wing_68[0]))/ns_wing68_d
ns_wing72_d= max(wing_72[0])-min(wing_72[0])
wing_72_x = np.zeros(len(wing_72[0]))
for i in range(0,len(wing_72_x)):
wing_72_x [i] = (wing_72[0][i]-min(wing_72[0]))/ns_wing72_d
ns_wing75_d= max(wing_75[0])-min(wing_75[0])
wing_75_x = np.zeros(len(wing_75[0]))
for i in range(0,len(wing_75_x)):
wing_75_x [i] = (wing_75[0][i]-min(wing_75[0]))/ns_wing75_d
ns_wing82_d= max(wing_82[0])-min(wing_82[0])
wing_82_x = np.zeros(len(wing_82[0]))
for i in range(0,len(wing_82_x)):
wing_82_x [i] = (wing_82[0][i]-min(wing_82[0]))/ns_wing82_d
ns_wing89_d= max(wing_89[0])-min(wing_89[0])
wing_89_x = np.zeros(len(wing_89[0]))
for i in range(0,len(wing_89_x)):
wing_89_x [i] = (wing_89[0][i]-min(wing_89[0]))/ns_wing89_d
ns_wing96_d= max(wing_96[0])-min(wing_96[0])
wing_96_x = np.zeros(len(wing_96[0]))
for i in range(0,len(wing_96_x)):
wing_96_x [i] = (wing_96[0][i]-min(wing_96[0]))/ns_wing96_d
#_______________________________________________________________
#________________________________________________________________
# FLAP
ns_flap15_d= max(flap_15[0])-min(flap_15[0])
flap_15_x = np.zeros(len(flap_15[0]))
for i in range(0,len(flap_15_x)):
flap_15_x [i] = (flap_15[0][i]-min(flap_15[0]))/ns_flap15_d
ns_flap29_d= max(flap_29[0])-min(flap_29[0])
flap_29_x = np.zeros(len(flap_29[0]))
for i in range(0,len(flap_29_x)):
flap_29_x [i] = (flap_29[0][i]-min(flap_29[0]))/ns_flap29_d
ns_flap45_d= max(flap_45[0])-min(flap_45[0])
flap_45_x = np.zeros(len(flap_45[0]))
for i in range(0,len(flap_45_x)):
flap_45_x [i] = (flap_45[0][i]-min(flap_45[0]))/ns_flap45_d
ns_flap54_d= max(flap_54[0])-min(flap_54[0])
flap_54_x = np.zeros(len(flap_54[0]))
for i in range(0,len(flap_54_x)):
flap_54_x [i] = (flap_54[0][i]-min(flap_54[0]))/ns_flap54_d
ns_flap68_d= max(flap_68[0])-min(flap_68[0])
flap_68_x = np.zeros(len(flap_68[0]))
for i in range(0,len(flap_68_x)):
flap_68_x [i] = (flap_68[0][i]-min(flap_68[0]))/ns_flap68_d
ns_flap72_d= max(flap_72[0])-min(flap_72[0])
flap_72_x = np.zeros(len(flap_72[0]))
for i in range(0,len(flap_72_x)):
flap_72_x [i] = (flap_72[0][i]-min(flap_72[0]))/ns_flap72_d
ns_flap75_d= max(flap_75[0])-min(flap_75[0])
flap_75_x = np.zeros(len(flap_75[0]))
for i in range(0,len(flap_75_x)):
flap_75_x [i] = (flap_75[0][i]-min(flap_75[0]))/ns_flap75_d
ns_flap82_d= max(flap_82[0])-min(flap_82[0])
flap_82_x = np.zeros(len(flap_82[0]))
for i in range(0,len(flap_82_x)):
flap_82_x [i] = (flap_82[0][i]-min(flap_82[0]))/ns_flap82_d
ns_flap89_d= max(flap_89[0])-min(flap_89[0])
flap_89_x = np.zeros(len(flap_89[0]))
for i in range(0,len(flap_89_x)):
flap_89_x [i] = (flap_89[0][i]-min(flap_89[0]))/ns_flap89_d
ns_flap96_d= max(flap_96[0])-min(flap_96[0])
flap_96_x = np.zeros(len(flap_96[0]))
for i in range(0,len(flap_96_x)):
flap_96_x [i] = (flap_96[0][i]-min(flap_96[0]))/ns_flap96_d
In [30]:
import zutil
import zutil.post as post
#reload(zutil)
#reload(post)
from zutil.post import get_csv_data
import os
import glob
###import the SLAT cut
slat_15_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_15_coarse.csv"
,header=True,remote=True,delim=',')
slat_29_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_29_coarse.csv"
,header=True,remote=True,delim=',')
slat_45_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_45_coarse.csv"
,header=True,remote=True,delim=',')
slat_54_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_54_coarse.csv"
,header=True,remote=True,delim=',')
slat_68_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_68_coarse.csv"
,header=True,remote=True,delim=',')
slat_72_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_72_coarse.csv"
,header=True,remote=True,delim=',')
slat_75_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_75_coarse.csv"
,header=True,remote=True,delim=',')
slat_82_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_82_coarse.csv"
,header=True,remote=True,delim=',')
slat_89_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_89_coarse.csv"
,header=True,remote=True,delim=',')
slat_96_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/slat_96_coarse.csv"
,header=True,remote=True,delim=',')
### import the flap cut
flap_15_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_15_coarse.csv"
,header=True,remote=True,delim=',')
flap_29_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_29_coarse.csv"
,header=True,remote=True,delim=',')
flap_45_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_45_coarse.csv"
,header=True,remote=True,delim=' ')
flap_54_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_54_coarse.csv"
,header=True,remote=True,delim=' ')
flap_68_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_68_coarse.csv"
,header=True,remote=True,delim=' ')
flap_72_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_72_coarse.csv"
,header=True,remote=True,delim=' ')
flap_75_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_75_coarse.csv"
,header=True,remote=True,delim=' ')
flap_82_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_82_coarse.csv"
,header=True,remote=True,delim=' ')
flap_89_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_89_coarse.csv"
,header=True,remote=True,delim=' ')
flap_96_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/flap_96_coarse.csv"
,header=True,remote=True,delim=' ')
### import the wing cut
wing_15_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_15_coarse.csv"
,header=True,remote=True,delim=',')
wing_29_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_29_coarse.csv"
,header=True,remote=True,delim=',')
wing_45_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_45_coarse.csv"
,header=True,remote=True,delim=',')
wing_54_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_54_coarse.csv"
,header=True,remote=True,delim=',')
wing_68_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_68_coarse.csv"
,header=True,remote=True,delim=',')
wing_72_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_72_coarse.csv"
,header=True,remote=True,delim=',')
wing_75_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_75_coarse.csv"
,header=True,remote=True,delim=',')
wing_82_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_82_coarse.csv"
,header=True,remote=True,delim=',')
wing_89_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_89_coarse.csv"
,header=True,remote=True,delim=',')
wing_96_fluent = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/high_lift/results/fluent_results/wing_96_coarse.csv"
,header=True,remote=True,delim=',')
ns_slat15_d_fluent= max(slat_15_fluent[0])-min(slat_15_fluent[0])
slat_15_x_fluent = np.zeros(len(slat_15_fluent[0]))
for i in range(0,len(slat_15_x_fluent)):
slat_15_x_fluent [i] = (slat_15_fluent[0][i]-min(slat_15_fluent[0]))/ns_slat15_d_fluent
ns_slat29_d_fluent= max(slat_29_fluent[0])-min(slat_29_fluent[0])
slat_29_x_fluent = np.zeros(len(slat_29_fluent[0]))
for i in range(0,len(slat_29_x_fluent)):
slat_29_x_fluent [i] = (slat_29_fluent[0][i]-min(slat_29_fluent[0]))/ns_slat29_d_fluent
ns_slat45_d_fluent= max(slat_45_fluent[0])-min(slat_45_fluent[0])
slat_45_x_fluent = np.zeros(len(slat_45_fluent[0]))
for i in range(0,len(slat_45_x_fluent)):
slat_45_x_fluent [i] = (slat_45_fluent[0][i]-min(slat_45_fluent[0]))/ns_slat45_d_fluent
ns_slat54_d_fluent= max(slat_54_fluent[0])-min(slat_54_fluent[0])
slat_54_x_fluent = np.zeros(len(slat_54_fluent[0]))
for i in range(0,len(slat_54_x_fluent)):
slat_54_x_fluent [i] = (slat_54_fluent[0][i]-min(slat_54_fluent[0]))/ns_slat54_d_fluent
ns_slat68_d_fluent= max(slat_68_fluent[0])-min(slat_68_fluent[0])
slat_68_x_fluent = np.zeros(len(slat_68_fluent[0]))
for i in range(0,len(slat_68_x_fluent)):
slat_68_x_fluent [i] = (slat_68_fluent[0][i]-min(slat_68_fluent[0]))/ns_slat68_d_fluent
ns_slat72_d_fluent= max(slat_72_fluent[0])-min(slat_72_fluent[0])
slat_72_x_fluent = np.zeros(len(slat_72_fluent[0]))
for i in range(0,len(slat_72_x_fluent)):
slat_72_x_fluent [i] = (slat_72_fluent[0][i]-min(slat_72_fluent[0]))/ns_slat72_d_fluent
ns_slat75_d_fluent= max(slat_75_fluent[0])-min(slat_75_fluent[0])
slat_75_x_fluent = np.zeros(len(slat_75_fluent[0]))
for i in range(0,len(slat_75_x_fluent)):
slat_75_x_fluent [i] = (slat_75_fluent[0][i]-min(slat_75_fluent[0]))/ns_slat75_d_fluent
ns_slat82_d_fluent= max(slat_82_fluent[0])-min(slat_82_fluent[0])
slat_82_x_fluent = np.zeros(len(slat_82_fluent[0]))
for i in range(0,len(slat_82_x_fluent)):
slat_82_x_fluent [i] = (slat_82_fluent[0][i]-min(slat_82_fluent[0]))/ns_slat82_d_fluent
ns_slat89_d_fluent= max(slat_89_fluent[0])-min(slat_89_fluent[0])
slat_89_x_fluent = np.zeros(len(slat_89_fluent[0]))
for i in range(0,len(slat_89_x_fluent)):
slat_89_x_fluent [i] = (slat_89_fluent[0][i]-min(slat_89_fluent[0]))/ns_slat89_d_fluent
ns_slat96_d_fluent= max(slat_96_fluent[0])-min(slat_96_fluent[0])
slat_96_x_fluent = np.zeros(len(slat_96_fluent[0]))
for i in range(0,len(slat_96_x_fluent)):
slat_96_x_fluent [i] = (slat_96_fluent[0][i]-min(slat_96_fluent[0]))/ns_slat96_d_fluent
#________________________________________________________________
# main wing
ns_wing15_d_fluent= max(wing_15_fluent[0])-min(wing_15_fluent[0])
wing_15_x_fluent = np.zeros(len(wing_15_fluent[0]))
for i in range(0,len(wing_15_x_fluent)):
wing_15_x_fluent [i] = (wing_15_fluent[0][i]-min(wing_15_fluent[0]))/ns_wing15_d_fluent
ns_wing29_d_fluent= max(wing_29_fluent[0])-min(wing_29_fluent[0])
wing_29_x_fluent = np.zeros(len(wing_29_fluent[0]))
for i in range(0,len(wing_29_x_fluent)):
wing_29_x_fluent [i] = (wing_29_fluent[0][i]-min(wing_29_fluent[0]))/ns_wing29_d_fluent
ns_wing45_d_fluent= max(wing_45_fluent[0])-min(wing_45_fluent[0])
wing_45_x_fluent = np.zeros(len(wing_45_fluent[0]))
for i in range(0,len(wing_45_x_fluent)):
wing_45_x_fluent [i] = (wing_45_fluent[0][i]-min(wing_45_fluent[0]))/ns_wing45_d_fluent
ns_wing54_d_fluent= max(wing_54_fluent[0])-min(wing_54_fluent[0])
wing_54_x_fluent = np.zeros(len(wing_54_fluent[0]))
for i in range(0,len(wing_54_x_fluent)):
wing_54_x_fluent [i] = (wing_54_fluent[0][i]-min(wing_54_fluent[0]))/ns_wing54_d_fluent
ns_wing68_d_fluent = max(wing_68_fluent[0])-min(wing_68_fluent[0])
wing_68_x_fluent = np.zeros(len(wing_68_fluent[0]))
for i in range(0,len(wing_68_x_fluent)):
wing_68_x_fluent [i] = (wing_68_fluent[0][i]-min(wing_68_fluent[0]))/ns_wing68_d_fluent
ns_wing72_d_fluent= max(wing_72_fluent[0])-min(wing_72_fluent[0])
wing_72_x_fluent = np.zeros(len(wing_72_fluent[0]))
for i in range(0,len(wing_72_x_fluent)):
wing_72_x_fluent [i] = (wing_72_fluent[0][i]-min(wing_72_fluent[0]))/ns_wing72_d_fluent
ns_wing75_d_fluent = max(wing_75_fluent[0])-min(wing_75_fluent[0])
wing_75_x_fluent = np.zeros(len(wing_75_fluent[0]))
for i in range(0,len(wing_75_x_fluent)):
wing_75_x_fluent [i] = (wing_75_fluent[0][i]-min(wing_75_fluent[0]))/ns_wing75_d_fluent
ns_wing82_d_fluent = max(wing_82_fluent[0])-min(wing_82_fluent[0])
wing_82_x_fluent = np.zeros(len(wing_82_fluent[0]))
for i in range(0,len(wing_82_x_fluent)):
wing_82_x_fluent [i] = (wing_82_fluent[0][i]-min(wing_82_fluent[0]))/ns_wing82_d_fluent
ns_wing89_d_fluent= max(wing_89_fluent[0])-min(wing_89_fluent[0])
wing_89_x_fluent = np.zeros(len(wing_89_fluent[0]))
for i in range(0,len(wing_89_x_fluent)):
wing_89_x_fluent [i] = (wing_89_fluent[0][i]-min(wing_89_fluent[0]))/ns_wing89_d_fluent
ns_wing96_d_fluent= max(wing_96_fluent[0])-min(wing_96_fluent[0])
wing_96_x_fluent = np.zeros(len(wing_96_fluent[0]))
for i in range(0,len(wing_96_x_fluent)):
wing_96_x_fluent [i] = (wing_96_fluent[0][i]-min(wing_96_fluent[0]))/ns_wing96_d_fluent
#_______________________________________________________________
#________________________________________________________________
# FLAP
ns_flap15_d_fluent = max(flap_15_fluent[0])-min(flap_15_fluent[0])
flap_15_x_fluent = np.zeros(len(flap_15_fluent[0]))
for i in range(0,len(flap_15_x_fluent)):
flap_15_x_fluent [i] = (flap_15_fluent[0][i]-min(flap_15_fluent[0]))/ns_flap15_d_fluent
#### review this one !!!!!!!!!!
ns_flap29_d_fluent = max(flap_29_fluent[0])-min(flap_29_fluent[0])
flap_29_x_fluent = np.zeros(len(flap_29_fluent[0]))
for i in range(0,len(flap_29_x_fluent)):
flap_29_x_fluent [i] = (flap_29_fluent[0][i]-min(flap_29_fluent[0]))/ns_flap29_d_fluent
!!!!!!!!!!!!!
ns_flap45_d_fluent = max(flap_45_fluent[0])-min(flap_45_fluent[0])
flap_45_x_fluent = np.zeros(len(flap_45_fluent[0]))
for i in range(0,len(flap_45_x_fluent)):
flap_45_x_fluent [i] = (flap_45_fluent[0][i]-min(flap_45_fluent[0]))/ns_flap45_d_fluent
ns_flap54_d_fluent = max(flap_54_fluent[0])-min(flap_54_fluent[0])
flap_54_x_fluent = np.zeros(len(flap_54_fluent[0]))
for i in range(0,len(flap_54_x_fluent)):
flap_54_x_fluent [i] = (flap_54_fluent[0][i]-min(flap_54_fluent[0]))/ns_flap54_d_fluent
ns_flap68_d_fluent = max(flap_68_fluent[0])-min(flap_68_fluent[0])
flap_68_x_fluent = np.zeros(len(flap_68_fluent[0]))
for i in range(0,len(flap_68_x_fluent)):
flap_68_x_fluent [i] = (flap_68_fluent[0][i]-min(flap_68_fluent[0]))/ns_flap68_d_fluent
ns_flap72_d_fluent = max(flap_72_fluent[0])-min(flap_72_fluent[0])
flap_72_x_fluent = np.zeros(len(flap_72_fluent[0]))
for i in range(0,len(flap_72_x_fluent)):
flap_72_x_fluent [i] = (flap_72_fluent[0][i]-min(flap_72_fluent[0]))/ns_flap72_d_fluent
ns_flap75_d_fluent = max(flap_75_fluent[0])-min(flap_75_fluent[0])
flap_75_x_fluent = np.zeros(len(flap_75_fluent[0]))
for i in range(0,len(flap_75_x_fluent)):
flap_75_x_fluent [i] = (flap_75_fluent[0][i]-min(flap_75_fluent[0]))/ns_flap75_d_fluent
ns_flap82_d_fluent = max(flap_82_fluent[0])-min(flap_82_fluent[0])
flap_82_x_fluent = np.zeros(len(flap_82_fluent[0]))
for i in range(0,len(flap_82_x_fluent)):
flap_82_x_fluent [i] = (flap_82_fluent[0][i]-min(flap_82_fluent[0]))/ns_flap82_d_fluent
ns_flap89_d_fluent = max(flap_89_fluent[0])-min(flap_89_fluent[0])
flap_89_x_fluent = np.zeros(len(flap_89_fluent[0]))
for i in range(0,len(flap_89_x_fluent)):
flap_89_x_fluent [i] = (flap_89_fluent[0][i]-min(flap_89_fluent[0]))/ns_flap89_d_fluent
ns_flap96_d_fluent= max(flap_96_fluent[0])-min(flap_96_fluent[0])
flap_96_x_fluent = np.zeros(len(flap_96_fluent[0]))
for i in range(0,len(flap_96_x_fluent)):
flap_96_x_fluent [i] = (flap_96_fluent[0][i]-min(flap_96_fluent[0]))/ns_flap96_d_fluent
In [31]:
print flap_29_fluent.keys()
In [33]:
from matplotlib.backends.backend_pdf import PdfPages
from IPython.display import FileLink, display
from collections import OrderedDict
import matplotlib.font_manager as fm
prop=fm.FontProperties(size=20)
## VALIDATION OF THE WING
## we need to plot the whole section from 0 to 1 and not separately from 0 to 1.....Applied only to experimental
## we need to define eta = x_local / semispan
#eta = ['0.15' , '0.288' , '0.449' , '0.543' , '0.681' , '0.715' ,'0.818' , '0.891' ,'0.964']
comp_fig1 = pl.figure(figsize=(40, 10),dpi=150, facecolor='w', edgecolor='k')
comp_fig1.suptitle('PS1', fontsize=30, fontweight='bold')
comp_ax =comp_fig1.add_subplot(1,3,1)
comp_ax_w =comp_fig1.add_subplot(1,3,2)
comp_ax_f =comp_fig1.add_subplot(1,3,3)
comp_ax.grid(True)
comp_ax.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax.axis([-0.001,1.01,1.5,-4.])
comp_ax_w.grid(True)
comp_ax_w.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w.axis([-0.001,1.01,1.5,-4.])
comp_ax_f.grid(True)
comp_ax_f.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f.axis([-0.001,1.01,1.5,-4.])
comp_ax.plot(cp_ps01_slat[0],cp_ps01_slat[6],'b.', color='b', markersize=25,label = 'Experiment')
comp_ax.plot(s_norm_loop_1,s_loop_data_1[0][1],'b.', color='r',markersize=20,label = 'zCFD')
comp_ax.plot(slat_15_x,slat_15[3],'b.',color='k',markersize=20,label='CFD++')
comp_ax.plot(slat_15_x_fluent,slat_15_fluent[3],'b.',color='g',markersize=20,label='FLUENT')
comp_ax_w.plot(cp_ps01[0],cp_ps01[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_w.plot(w_norm_loop_1,w_loop_data_1[1][1] ,'b.',color='r',markersize=20,label = 'zCFD')
comp_ax_w.plot(wing_15_x,wing_15[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w.plot(wing_15_x_fluent,wing_15_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f.plot(cp_ps01_flap[0],cp_ps01_flap[6],'b.', color='b', markersize=25,label = 'Experiment')
comp_ax_f.plot(f_norm_loop_1,f_loop_data_1[2][1], 'b.', color ='r', markersize=20,label = 'zCFD')
comp_ax_f.plot(flap_15_x,flap_15[3], 'b.', color ='k', markersize=20,label = 'CFD++')
comp_ax_f.plot(flap_15_x_fluent,flap_15_fluent[3], 'b.', color ='g', markersize=20,label = 'FLUENT')
comp_ax.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f.legend(loc = 'upper right',numpoints=1,prop = prop)
pp1 = PdfPages('11.pdf')
pp1.savefig()
pp1.close()
comp_fig1.savefig("11.png")
show()
display(FileLink('11.png'))
# station 2
comp_fig2 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig2.suptitle('PS2', fontsize=30, fontweight='bold')
comp_ax_2 =comp_fig2.add_subplot(1,3,1)
comp_ax_w_2 =comp_fig2.add_subplot(1,3,2)
comp_ax_f_2 =comp_fig2.add_subplot(1,3,3)
comp_ax_2.grid(True)
comp_ax_2.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_2.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_2.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_2.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_2.grid(True)
comp_ax_w_2.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_2.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_2.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_2.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_2.grid(True)
comp_ax_f_2.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_2.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_2.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_2.axis([-0.001,1.01,1.5,-4.])
comp_ax_2.plot(cp_ps02_slat[0],cp_ps02_slat[6],'b.', color='b', markersize=25,label = 'Experiment')
comp_ax_2.plot(s_norm_loop_2,s_loop_data_2[0][1],'b.', color='r',markersize=20,label = 'zCFD')
comp_ax_2.plot(slat_29_x,slat_29[3],'b.',color='k',markersize=20,label='CFD++')
comp_ax_2.plot(slat_29_x_fluent,slat_29_fluent[3],'b.',color='g',markersize=20,label='FLUENT')
comp_ax_w_2.plot(cp_ps02[0],cp_ps02[6],'b.', color='b', markersize=25,label = 'Experiment')
comp_ax_w_2.plot(w_norm_loop_2,w_loop_data_2[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_2.plot(wing_29_x,wing_29[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_2.plot(wing_29_x_fluent,wing_29_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_2.plot(cp_ps02_flap[0],cp_ps02_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_2.plot(f_norm_loop_2,f_loop_data_2[2][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_2.plot(flap_29_x,flap_29[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_2.plot(flap_29_x_fluent,flap_29_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
##add the flap
comp_ax_2.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_2.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_2.legend(loc = 'upper right',numpoints=1,prop = prop)
pp2 = PdfPages('22.pdf')
pp2.savefig()
pp2.close()
comp_fig2.savefig("22.png")
show()
display(FileLink('22.png'))
# station 4
comp_fig4 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig4.suptitle('PS4', fontsize=30, fontweight='bold')
comp_ax_4 =comp_fig4.add_subplot(1,3,1)
comp_ax_w_4 =comp_fig4.add_subplot(1,3,2)
comp_ax_f_4 =comp_fig4.add_subplot(1,3,3)
comp_ax_4.grid(True)
comp_ax_4.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_4.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_4.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_4.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_4.grid(True)
comp_ax_w_4.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_4.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_4.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_4.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_4.grid(True)
comp_ax_f_4.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_4.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_4.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_4.axis([-0.001,1.01,1.5,-4.0])
comp_ax_4.plot(cp_ps04_slat[0],cp_ps04_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_4.plot(s_norm_loop_4,s_loop_data_4[2][1],'b.', color='r',markersize=20 , label = 'zCFD')
comp_ax_4.plot(slat_45_x,slat_45[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_4.plot(slat_45_x_fluent,slat_45_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_4.plot(cp_ps04[0],cp_ps04[6],'b.', color='b', markersize=25 , label = 'Experiment')
comp_ax_w_4.plot(w_norm_loop_4,w_loop_data_4[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_4.plot(wing_45_x,wing_45[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_4.plot(wing_45_x_fluent,wing_45_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_4.plot(cp_ps04_flap[0],cp_ps04_flap[6],'b.', color='b', markersize=25 ,label = 'Experiment')
comp_ax_f_4.plot(f_norm_loop_4,f_loop_data_4[0][1], 'b.', color ='r', markersize=20 ,label = 'zCFD')
comp_ax_f_4.plot(flap_45_x,flap_45[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_4.plot(flap_45_x_fluent,flap_45_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_4.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_4.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_4.legend(loc = 'upper right',numpoints=1,prop = prop)
pp4 = PdfPages('44.pdf')
pp4.savefig()
pp4.close()
comp_fig4.savefig("44.png")
show()
display(FileLink('44.png'))
# station 5
comp_fig5 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig5.suptitle('PS5', fontsize=30, fontweight='bold')
comp_ax_5 =comp_fig5.add_subplot(1,3,1)
comp_ax_w_5 =comp_fig5.add_subplot(1,3,2)
comp_ax_f_5 =comp_fig5.add_subplot(1,3,3)
comp_ax_5.grid(True)
comp_ax_5.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_5.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_5.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_5.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_5.grid(True)
comp_ax_w_5.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_5.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_5.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_5.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_5.grid(True)
comp_ax_f_5.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_5.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_5.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_5.axis([-0.001,1.01,1.5,-4.])
comp_ax_5.plot(cp_ps05_slat[0],cp_ps05_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_5.plot(s_norm_loop_5,s_loop_data_5[2][1],'b.', color='r',markersize=20, label = 'zCFD') # the slat is not in the first loop
comp_ax_5.plot(slat_54_x,slat_54[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_5.plot(slat_54_x_fluent,slat_54_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_5.plot(cp_ps05[0],cp_ps05[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_w_5.plot(w_norm_loop_5,w_loop_data_5[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_5.plot(wing_54_x,wing_54[1] ,'b.',color='k',markersize=20, label = 'zCFD')
comp_ax_w_5.plot(wing_54_x_fluent,wing_54_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_5.plot(cp_ps05_flap[0],cp_ps05_flap[6],'b.', color='b', markersize=25 , label = 'Experiment')
comp_ax_f_5.plot(f_norm_loop_5,f_loop_data_5[0][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_5.plot(flap_54_x,flap_54[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_5.plot(flap_54_x_fluent,flap_54_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_5.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_5.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_5.legend(loc = 'upper right',numpoints=1,prop = prop)
pp5 = PdfPages('55.pdf')
pp5.savefig()
pp5.close()
comp_fig5.savefig("55.png")
show()
display(FileLink('55.png'))
# station 6
comp_fig6 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig6.suptitle('PS6', fontsize=30, fontweight='bold')
comp_ax_6 =comp_fig6.add_subplot(1,3,1)
comp_ax_w_6 =comp_fig6.add_subplot(1,3,2)
comp_ax_f_6 =comp_fig6.add_subplot(1,3,3)
comp_ax_6.grid(True)
comp_ax_6.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_6.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_6.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_6.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_6.grid(True)
comp_ax_w_6.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_6.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_6.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_6.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_6.grid(True)
comp_ax_f_6.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_6.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_6.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_6.axis([-0.001,1.01,1.5,-4.])
comp_ax_6.plot(cp_ps06_slat[0],cp_ps06_slat[6],'b.', color='b', markersize=25,label = 'Experiment')
comp_ax_6.plot(s_norm_loop_6,s_loop_data_6[2][1],'b.', color='r',markersize=20, label = 'zCFD')
comp_ax_6.plot(slat_68_x,slat_68[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_6.plot(slat_68_x_fluent,slat_68_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_6.plot(cp_ps06[0],cp_ps06[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_w_6.plot(w_norm_loop_6,w_loop_data_6[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_6.plot(wing_68_x,wing_68[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_6.plot(wing_68_x_fluent,wing_68_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_6.plot(cp_ps06_flap[0],cp_ps06_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_6.plot(f_norm_loop_6,f_loop_data_6[0][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_6.plot(flap_68_x,flap_68[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_6.plot(flap_68_x_fluent,flap_68_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_6.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_6.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_6.legend(loc = 'upper right',numpoints=1,prop = prop)
pp6 = PdfPages('66.pdf')
pp6.savefig()
pp6.close()
comp_fig6.savefig("66.png")
show()
display(FileLink('66.png'))
# station 7
comp_fig7 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig7.suptitle('PS7', fontsize=30, fontweight='bold')
comp_ax_7 =comp_fig7.add_subplot(1,3,1)
comp_ax_w_7 =comp_fig7.add_subplot(1,3,2)
comp_ax_f_7 =comp_fig7.add_subplot(1,3,3)
comp_ax_7.grid(True)
comp_ax_7.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_7.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_7.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_7.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_7.grid(True)
comp_ax_w_7.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_7.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_7.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_7.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_7.grid(True)
comp_ax_f_7.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_7.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_7.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_7.axis([-0.001,1.01,1.5,-4.])
comp_ax_7.plot(cp_ps06_slat[0],cp_ps06_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_7.plot(s_norm_loop_7,s_loop_data_7[2][1],'b.', color='r',markersize=20, label = 'zCFD') #
comp_ax_7.plot(slat_72_x,slat_72[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_7.plot(slat_72_x_fluent,slat_72_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_7.plot(cp_ps07[0],cp_ps07[6],'b.', color='b', markersize=25 ,label = 'Experiment')
comp_ax_w_7.plot(w_norm_loop_7,w_loop_data_7[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_7.plot(wing_72_x,wing_72[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_7.plot(wing_72_x_fluent,wing_72_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_7.plot(cp_ps07_flap[0],cp_ps07_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_7.plot(f_norm_loop_7,f_loop_data_7[0][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_7.plot(flap_72_x,flap_72[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_7.plot(flap_72_x_fluent,flap_72_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_7.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_7.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_7.legend(loc = 'upper right',numpoints=1,prop = prop)
pp7 = PdfPages('77.pdf')
pp7.savefig()
pp7.close()
comp_fig7.savefig("77.png")
show()
display(FileLink('77.png'))
# station 8
comp_fig8 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig8.suptitle('PS8', fontsize=30, fontweight='bold')
comp_ax_8 =comp_fig8.add_subplot(1,3,1)
comp_ax_w_8 =comp_fig8.add_subplot(1,3,2)
comp_ax_f_8 =comp_fig8.add_subplot(1,3,3)
comp_ax_8.grid(True)
comp_ax_8.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_8.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_8.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_8.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_8.grid(True)
comp_ax_w_8.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_8.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_8.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_8.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_8.grid(True)
comp_ax_f_8.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_8.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_8.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_8.axis([-0.001,1.01,1.5,-4.])
comp_ax_8.plot(cp_ps08_slat[0],cp_ps08_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_8.plot(s_norm_loop_8,s_loop_data_8[2][1],'b.', color='r',markersize=20, label = 'zCFD') #
comp_ax_8.plot(slat_75_x,slat_75[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_8.plot(slat_75_x_fluent,slat_75_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_8.plot(cp_ps08[0],cp_ps08[6],'b.', color='b', markersize=25 ,label = 'Experiment')
comp_ax_w_8.plot(w_norm_loop_8,w_loop_data_8[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_8.plot(wing_75_x,wing_75[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_8.plot(wing_75_x_fluent,wing_75_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_8.plot(cp_ps08_flap[0],cp_ps08_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_8.plot(f_norm_loop_8,f_loop_data_8[0][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_8.plot(flap_75_x,flap_75[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_8.plot(flap_75_x_fluent,flap_75_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_8.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_8.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_8.legend(loc = 'upper right',numpoints=1,prop = prop)
pp8 = PdfPages('88.pdf')
pp8.savefig()
pp8.close()
comp_fig8.savefig("88.png")
show()
display(FileLink('88.png'))
# station 9
comp_fig9 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig9.suptitle('PS9', fontsize=30, fontweight='bold')
comp_ax_9 =comp_fig9.add_subplot(1,3,1)
comp_ax_w_9 =comp_fig9.add_subplot(1,3,2)
comp_ax_f_9 =comp_fig9.add_subplot(1,3,3)
comp_ax_9.grid(True)
comp_ax_9.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_9.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_9.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_9.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_9.grid(True)
comp_ax_w_9.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_9.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_9.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_9.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_9.grid(True)
comp_ax_f_9.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_9.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_9.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_9.axis([-0.001,1.01,1.5,-4.])
comp_ax_9.plot(cp_ps09_slat[0],cp_ps09_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_9.plot(s_norm_loop_9,s_loop_data_9[2][1],'b.', color='r',markersize=20, label = 'zCFD') #
comp_ax_9.plot(slat_82_x,slat_82[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_9.plot(slat_82_x_fluent,slat_82_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_9.plot(cp_ps09[0],cp_ps09[6],'b.', color='b', markersize=25, label = 'Experimet')
comp_ax_w_9.plot(w_norm_loop_9,w_loop_data_9[1][1] ,'b.',color='r',markersize=20 , label = 'zCFD')
comp_ax_w_9.plot(wing_82_x,wing_82[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_9.plot(wing_82_x_fluent,wing_82_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_9.plot(cp_ps09_flap[0],cp_ps09_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_9.plot(f_norm_loop_9,f_loop_data_9[0][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_9.plot(flap_82_x,flap_82[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_9.plot(flap_82_x_fluent,flap_82_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_9.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_9.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_9.legend(loc = 'upper right',numpoints=1,prop = prop)
pp9 = PdfPages('99.pdf')
pp9.savefig()
pp9.close()
comp_fig9.savefig("99.png")
show()
display(FileLink('99.png'))
# station 10
comp_fig10 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig10.suptitle('PS10', fontsize=30, fontweight='bold')
comp_ax_10 =comp_fig10.add_subplot(1,3,1)
comp_ax_w_10 =comp_fig10.add_subplot(1,3,2)
comp_ax_f_10 =comp_fig10.add_subplot(1,3,3)
comp_ax_10.grid(True)
comp_ax_10.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_10.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_10.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_10.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_10.grid(True)
comp_ax_w_10.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_10.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_10.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_10.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_10.grid(True)
comp_ax_f_10.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_10.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_10.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_10.axis([-0.001,1.01,1.5,-4.])
comp_ax_10.plot(cp_ps10_slat[0],cp_ps10_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_10.plot(s_norm_loop_10,s_loop_data_10[0][1],'b.', color='r',markersize=20, label = 'zCFD') #
comp_ax_10.plot(slat_89_x,slat_89[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_10.plot(slat_89_x_fluent,slat_89_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_10.plot(cp_ps10[0],cp_ps10[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_w_10.plot(w_norm_loop_10,w_loop_data_10[0][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_10.plot(wing_89_x,wing_89[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_10.plot(wing_89_x_fluent,wing_89_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_10.plot(cp_ps10_flap[0],cp_ps10_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_10.plot(f_norm_loop_10,f_loop_data_10[2][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_10.plot(flap_89_x,flap_89[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_10.plot(flap_89_x_fluent,flap_89_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_10.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_10.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_10.legend(loc = 'upper right',numpoints=1,prop = prop)
pp10 = PdfPages('10.pdf')
pp10.savefig()
pp10.close()
comp_fig10.savefig("10.png")
show()
display(FileLink('10.png'))
# station 11
comp_fig11 = pl.figure(figsize=(40, 10),dpi=600, facecolor='w', edgecolor='k')
comp_fig11.suptitle('PS11', fontsize=30, fontweight='bold')
comp_ax_11 =comp_fig11.add_subplot(1,3,1)
comp_ax_w_11 =comp_fig11.add_subplot(1,3,2)
comp_ax_f_11 =comp_fig11.add_subplot(1,3,3)
comp_ax_11.grid(True)
comp_ax_11.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_11.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_11.set_title('Slat', fontsize=20, fontweight='bold')
comp_ax_11.axis([-0.001,1.01,1.5,-4.])
comp_ax_w_11.grid(True)
comp_ax_w_11.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_w_11.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_w_11.set_title('Main Wing', fontsize=20, fontweight='bold')
comp_ax_w_11.axis([-0.001,1.01,1.5,-4.])
comp_ax_f_11.grid(True)
comp_ax_f_11.set_xlabel('x/c', fontsize=20, fontweight='bold')
comp_ax_f_11.set_ylabel('Cp []', fontsize=20, fontweight='bold')
comp_ax_f_11.set_title('Flap', fontsize=20, fontweight='bold')
comp_ax_f_11.axis([-0.001,1.01,1.5,-4.])
comp_ax_11.plot(cp_ps11_slat[0],cp_ps11_slat[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_11.plot(s_norm_loop_11,s_loop_data_11[0][1],'b.', color='r',markersize=20, label = 'zCFD') #
comp_ax_11.plot(slat_96_x,slat_96[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_11.plot(slat_96_x_fluent,slat_96_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_w_11.plot(cp_ps11[0],cp_ps11[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_w_11.plot(w_norm_loop_11,w_loop_data_11[1][1] ,'b.',color='r',markersize=20, label = 'zCFD')
comp_ax_w_11.plot(wing_96_x,wing_96[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_w_11.plot(wing_96_x_fluent,wing_96_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_f_11.plot(cp_ps11_flap[0],cp_ps11_flap[6],'b.', color='b', markersize=25, label = 'Experiment')
comp_ax_f_11.plot(f_norm_loop_11,f_loop_data_11[2][1], 'b.', color ='r', markersize=20, label = 'zCFD')
comp_ax_f_11.plot(flap_96_x,flap_96[3] ,'b.',color='k',markersize=20,label = 'CFD++')
comp_ax_f_11.plot(flap_96_x_fluent,flap_96_fluent[3] ,'b.',color='g',markersize=20,label = 'FLUENT')
comp_ax_11.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_w_11.legend(loc = 'upper right',numpoints=1,prop = prop)
comp_ax_f_11.legend(loc = 'upper right',numpoints=1,prop = prop)
pp11 = PdfPages('1_11.pdf')
pp11.savefig()
pp11.close()
comp_fig11.savefig("1_11.png")
show()
display(FileLink('1_11.png'))
In [ ]:
In [34]:
from zutil.post import residual_plot, get_case_report
residual_plot(get_case_report(case_name))
show()
In [35]:
if remote_data:
print 'Disconnecting from remote paraview server connection'
Disconnect()
pass
In [15]: